Error processing SSI file
LEADTOOLS (Leadtools assembly)

Show in webframe

IptcSeparator Field








The separator when a file has two or more IPTC comments.
Syntax
public static readonly int IptcSeparator
'Declaration
 
Public Shared ReadOnly IptcSeparator As Integer
'Usage
 
Dim value As Integer
 
value = RasterCommentMetadata.IptcSeparator
public static readonly int IptcSeparator
extern const NSInteger LTRasterCommentMetadataTypeIptcSeparator
public static final int IPTC_SEPARATOR = DefineConstants.IPTC_SEPARATOR;
 var IptcSeparator 
public:
static readonly int IptcSeparator
Example
Copy Code  
Imports Leadtools
Imports Leadtools.Codecs

      
  Public Sub CommentsSizeAndTypeExample()
   Console.WriteLine("IptcSeparator : {0}", RasterCommentMetadata.IptcSeparator)
   Console.WriteLine("Data type sizes:")
   Console.WriteLine("------------------")
   Dim dataTypes As Array = System.Enum.GetValues(GetType(RasterCommentMetadataDataType))
   For Each dataType As RasterCommentMetadataDataType In dataTypes
      Dim size As Integer = RasterCommentMetadata.GetDataTypeSize(dataType)
      Console.WriteLine("{0}: {1} bytes", dataType, size)
   Next dataType

   Console.WriteLine("Comment data types:")
   Console.WriteLine("------------------")
   Dim types As Array = System.Enum.GetValues(GetType(RasterCommentMetadataType))
   For Each type As RasterCommentMetadataType In types
      Dim dataType As RasterCommentMetadataDataType = RasterCommentMetadata.GetDataType(type)
      Console.WriteLine("{0}: {1}", type, dataType)
   Next type
End Sub
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);
   }
}
RasterCommentMetadataExamples.prototype.CommentsSizeAndTypeExample = function () {
    Tools.SetLicense();
    with (Leadtools) {
        with (Leadtools.Codecs) {
            with (Leadtools.ImageProcessing) {

                console.info("IptcSeparator : ", RasterCommentMetadata.iptcSeparator);

                console.info("Data type sizes:");
                console.info("------------------");

                for (enumName in RasterCommentMetadataDataType) {
                    enumValue = RasterCommentMetadataDataType[enumName];
                    var size = RasterCommentMetadata.getDataTypeSize(enumValue);
                    console.info(dataType + ": " + size + " bytes");
                }

                console.info("Comment data types:");
                console.info("------------------");

                for(commentName in RasterCommentMetadataType)
                {
                    commentType = RasterCommentMetadataType[commentName];
                    var dataType = RasterCommentMetadata.getDataType(commentType);
                    console.info(commentType + " : " + dataType);
                }
            }
        }
    }
}
using Leadtools;
using Leadtools.Codecs;

        
public void CommentsSizeAndTypeExample()
{
    Debug.WriteLine("IptcSeparator : {0}", RasterCommentMetadata.IptcSeparator);
    Debug.WriteLine("Data type sizes:");
    Debug.WriteLine("------------------");
    Array dataTypes = Enum.GetValues(typeof(RasterCommentMetadataDataType));
    foreach (RasterCommentMetadataDataType dataType in dataTypes)
    {
        int size = RasterCommentMetadata.GetDataTypeSize(dataType);
        Debug.WriteLine("{0}: {1} bytes", dataType, size);
    }

    Debug.WriteLine("Comment data types:");
    Debug.WriteLine("------------------");
    Array types = Enum.GetValues(typeof(RasterCommentMetadataType));
    foreach (RasterCommentMetadataType type in types)
    {
        RasterCommentMetadataDataType dataType = RasterCommentMetadata.GetDataType(type);
        Debug.WriteLine("{0}: {1}", type, dataType);
    }
}
using Leadtools;
using Leadtools.Codecs;
using Leadtools.Examples;
using Leadtools.ImageProcessing;

private static T[] GetEnumValues<T>()
{
   Type enumType = typeof(T);
   if (!enumType.IsEnum)
   {
      throw new ArgumentException("Not an enum type: " + enumType.Name);
   }
   List<T> values = new List<T>();
   foreach (System.Reflection.FieldInfo field in enumType.GetFields())
   {
      if (field.IsLiteral)
         values.Add((T)field.GetValue(enumType));
   }
   return values.ToArray();
}
public void CommentsSizeAndTypeExample()
{
   Debug.WriteLine("IptcSeparator : {0}", RasterCommentMetadata.IptcSeparator);

   Debug.WriteLine("Data type sizes:");
   Debug.WriteLine("------------------");
   RasterCommentMetadataType[] dataTypes = GetEnumValues<RasterCommentMetadataType>();
   foreach(RasterCommentMetadataDataType dataType in dataTypes)
   {
      int size = RasterCommentMetadata.GetDataTypeSize(dataType);
      Debug.WriteLine("{0}: {1} bytes", dataType, size);
   }

   Debug.WriteLine("Comment data types:");
   Debug.WriteLine("------------------");
   RasterCommentMetadataType[] types = GetEnumValues<RasterCommentMetadataType>();
   foreach (RasterCommentMetadataType type in types)
   {
      RasterCommentMetadataDataType dataType = RasterCommentMetadata.GetDataType(type);
      Debug.WriteLine("{0}: {1}", type, dataType);
   }
}
Imports Leadtools
Imports Leadtools.Codecs
Imports Leadtools.ImageProcessing

Private Shared Function GetEnumValues(Of T)() As T()
   Dim enumType As Type = GetType(T)
   If (Not enumType.IsEnum) Then
      Throw New ArgumentException("Not an enum type: " & enumType.Name)
   End If
   Dim values As List(Of T) = New List(Of T)()
   For Each field As System.Reflection.FieldInfo In enumType.GetFields()
      If field.IsLiteral Then
         values.Add(CType(field.GetValue(enumType), T))
      End If
   Next field
   Return values.ToArray()
End Function
Public Sub CommentsSizeAndTypeExample()
   Debug.WriteLine("IptcSeparator : {0}", RasterCommentMetadata.IptcSeparator)

   Debug.WriteLine("Data type sizes:")
   Debug.WriteLine("------------------")
   Dim dataTypes As RasterCommentMetadataType() = GetEnumValues(Of RasterCommentMetadataType)()
   For Each dataType As RasterCommentMetadataDataType In dataTypes
      Dim size As Integer = RasterCommentMetadata.GetDataTypeSize(dataType)
      Debug.WriteLine("{0}: {1} bytes", dataType, size)
   Next dataType

   Debug.WriteLine("Comment data types:")
   Debug.WriteLine("------------------")
   Dim types As RasterCommentMetadataType() = GetEnumValues(Of RasterCommentMetadataType)()
   For Each type As RasterCommentMetadataType In types
      Dim dataType As RasterCommentMetadataDataType = RasterCommentMetadata.GetDataType(type)
      Debug.WriteLine("{0}: {1}", type, dataType)
   Next type
End Sub
Remarks

IptcSeparator has an ASCII code of 1 and cannot appear in any comment, so there is not a possibility of confusion about this character is the separator or part of the comment. Do not confuse this with the character '1', whose Ascii code is 49!

For more information, refer to IPTC Comments.

Requirements

Target Platforms

See Also

Reference

RasterCommentMetadata Class
RasterCommentMetadata Members

Error processing SSI file