←Select platform

GetDataTypeSize Method

Summary
Gets the size (in bytes) of the specified RasterCommentMetadataDataType.
Syntax
C#
Objective-C
C++/CLI
Java
Python
public static int GetDataTypeSize( 
   RasterCommentMetadataDataType dataType 
) 
+ (NSUInteger)sizeForDataType:(LTRasterCommentMetadataDataType)dataType 
public static int getDataTypeSize( 
   RasterCommentMetadataDataType dataType 
); 
public: 
static int GetDataTypeSize(  
   RasterCommentMetadataDataType dataType 
)  
def GetDataTypeSize(self,dataType): 

Parameters

dataType
The RasterCommentMetadataDataType for which to get the size.

Return Value

The size (in bytes) of  dataType.

Example
C#
Java
using Leadtools; 
using Leadtools.Codecs; 
 
 
public void CommentsSizeAndTypeExample() 
{ 
	Console.WriteLine("IptcSeparator : {0}", RasterCommentMetadata.IptcSeparator); 
 
	Console.WriteLine("Data type sizes:"); 
	Console.WriteLine("------------------"); 
	Array dataTypes = Enum.GetValues(typeof(RasterCommentMetadataDataType)); 
	foreach (RasterCommentMetadataDataType dataType in dataTypes) 
	{ 
		int size = RasterCommentMetadata.GetDataTypeSize(dataType); 
		Console.WriteLine("{0}: {1} bytes", dataType, size); 
	} 
 
	Console.WriteLine("Comment data types:"); 
	Console.WriteLine("------------------"); 
	Array types = Enum.GetValues(typeof(RasterCommentMetadataType)); 
	foreach (RasterCommentMetadataType type in types) 
	{ 
		RasterCommentMetadataDataType dataType = RasterCommentMetadata.GetDataType(type); 
		Console.WriteLine("{0}: {1}", type, dataType); 
	} 
} 
 
import java.io.File; 
import java.io.IOException; 
 
import org.junit.*; 
import org.junit.runner.JUnitCore; 
import org.junit.runner.Result; 
import org.junit.runner.notification.Failure; 
import static org.junit.Assert.*; 
 
import leadtools.*; 
import leadtools.codecs.*; 
 
 
public void CommentsSizeAndTypeExample() { 
   System.out.printf("IptcSeparator : %s\n", RasterCommentMetadata.IPTC_SEPARATOR); 
   System.out.println("Data type sizes:"); 
   System.out.println("------------------"); 
   RasterCommentMetadataDataType[] dataTypes = RasterCommentMetadataDataType.class.getEnumConstants(); 
   for (RasterCommentMetadataDataType dataType : dataTypes) { 
      int size = RasterCommentMetadata.getDataTypeSize(dataType); 
      System.out.printf("%s: %d bytes\n", dataType, size); 
   } 
 
   System.out.println("Comment data types:"); 
   System.out.println("------------------"); 
   RasterCommentMetadataType[] types = RasterCommentMetadataType.class.getEnumConstants(); 
   for (RasterCommentMetadataType type : types) { 
      RasterCommentMetadataDataType dataType = RasterCommentMetadata.getDataType(type); 
      System.out.printf("%s: %s\n", type, dataType); 
   } 
} 
Requirements

Target Platforms

Help Version 23.0.2024.5.22
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

Leadtools Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.