C# Class BitMiracle.LibTiff.Classic.FieldValue

Afficher le fichier Open project: Core-Techs/TiffLibrary Class Usage Examples

Méthodes publiques

Méthode Description
GetBytes ( ) : byte[]

Retrieves value converted to byte array.

If value is byte array then it retrieved unaltered.

If value is array of short, ushort, int, uint, float or double values then this array is converted to byte array

If value is a string then it gets converted to byte array using Latin1 encoding encoder.

If value is of any other type then null is returned.

ToByte ( ) : byte

Retrieves value converted to byte.

ToByteArray ( ) : byte[]

Retrieves value converted to array of bytes.

If value is array of bytes then it retrieved unaltered.

If value is array of short, ushort, int or uint values then each element of field value gets converted to byte and added to resulting array.

If value is string then it gets converted to byte[] using Latin1 encoding encoder.

If value is of any other type then null is returned.

ToDouble ( ) : double

Retrieves value converted to double.

ToDoubleArray ( ) : double[]

Retrieves value converted to array of double values.

If value is array of double values then it retrieved unaltered.

If value is array of bytes then each 8 bytes are converted to double and added to resulting array. If value contains amount of bytes that can't be divided by 8 without remainder, then null is returned.

If value is array of float values then each element of field value gets converted to double and added to resulting array.

If value is of any other type then null is returned.

ToFloat ( ) : float

Retrieves value converted to float.

ToFloatArray ( ) : float[]

Retrieves value converted to array of float values.

If value is array of float values then it retrieved unaltered.

If value is array of bytes then each 4 bytes are converted to float and added to resulting array. If value contains amount of bytes that can't be divided by 4 without remainder, then null is returned.

If value is array of double values then each element of field value gets converted to float and added to resulting array.

If value is of any other type then null is returned.

ToInt ( ) : int

Retrieves value converted to int.

ToIntArray ( ) : int[]

Retrieves value converted to array of int values.

If value is array of int values then it retrieved unaltered.

If value is array of bytes then each 4 bytes are converted to int and added to resulting array. If value contains amount of bytes that can't be divided by 4 without remainder, then null is returned.

If value is array of short, ushort or uint values then each element of field value gets converted to int and added to resulting array.

If value is of any other type then null is returned.

ToShort ( ) : short

Retrieves value converted to short.

ToShortArray ( ) : short[]

Retrieves value converted to array of short values.

If value is array of short values then it retrieved unaltered.

If value is array of bytes then each pair of bytes is converted to short and added to resulting array. If value contains odd amount of bytes, then null is returned.

If value is array of ushort, int or uint values then each element of field value gets converted to short and added to resulting array.

If value is of any other type then null is returned.

ToString ( ) : string

Retrieves value converted to string.

If value is a byte array, then it gets converted to string using Latin1 encoding encoder.

Private Methods

Méthode Description
FieldValue ( object o ) : System
FromParams ( ) : BitMiracle.LibTiff.Classic.FieldValue[]
Set ( object o ) : void
ToUInt ( ) : uint
ToUIntArray ( ) : uint[]
ToUShort ( ) : ushort
ToUShortArray ( ) : ushort[]

Method Details

GetBytes() public méthode

Retrieves value converted to byte array.

If value is byte array then it retrieved unaltered.

If value is array of short, ushort, int, uint, float or double values then this array is converted to byte array

If value is a string then it gets converted to byte array using Latin1 encoding encoder.

If value is of any other type then null is returned.

public GetBytes ( ) : byte[]
Résultat byte[]

ToByte() public méthode

Retrieves value converted to byte.
public ToByte ( ) : byte
Résultat byte

ToByteArray() public méthode

Retrieves value converted to array of bytes.

If value is array of bytes then it retrieved unaltered.

If value is array of short, ushort, int or uint values then each element of field value gets converted to byte and added to resulting array.

If value is string then it gets converted to byte[] using Latin1 encoding encoder.

If value is of any other type then null is returned.

public ToByteArray ( ) : byte[]
Résultat byte[]

ToDouble() public méthode

Retrieves value converted to double.
public ToDouble ( ) : double
Résultat double

ToDoubleArray() public méthode

Retrieves value converted to array of double values.

If value is array of double values then it retrieved unaltered.

If value is array of bytes then each 8 bytes are converted to double and added to resulting array. If value contains amount of bytes that can't be divided by 8 without remainder, then null is returned.

If value is array of float values then each element of field value gets converted to double and added to resulting array.

If value is of any other type then null is returned.

public ToDoubleArray ( ) : double[]
Résultat double[]

ToFloat() public méthode

Retrieves value converted to float.
public ToFloat ( ) : float
Résultat float

ToFloatArray() public méthode

Retrieves value converted to array of float values.

If value is array of float values then it retrieved unaltered.

If value is array of bytes then each 4 bytes are converted to float and added to resulting array. If value contains amount of bytes that can't be divided by 4 without remainder, then null is returned.

If value is array of double values then each element of field value gets converted to float and added to resulting array.

If value is of any other type then null is returned.

public ToFloatArray ( ) : float[]
Résultat float[]

ToInt() public méthode

Retrieves value converted to int.
public ToInt ( ) : int
Résultat int

ToIntArray() public méthode

Retrieves value converted to array of int values.

If value is array of int values then it retrieved unaltered.

If value is array of bytes then each 4 bytes are converted to int and added to resulting array. If value contains amount of bytes that can't be divided by 4 without remainder, then null is returned.

If value is array of short, ushort or uint values then each element of field value gets converted to int and added to resulting array.

If value is of any other type then null is returned.

public ToIntArray ( ) : int[]
Résultat int[]

ToShort() public méthode

Retrieves value converted to short.
public ToShort ( ) : short
Résultat short

ToShortArray() public méthode

Retrieves value converted to array of short values.

If value is array of short values then it retrieved unaltered.

If value is array of bytes then each pair of bytes is converted to short and added to resulting array. If value contains odd amount of bytes, then null is returned.

If value is array of ushort, int or uint values then each element of field value gets converted to short and added to resulting array.

If value is of any other type then null is returned.

public ToShortArray ( ) : short[]
Résultat short[]

ToString() public méthode

Retrieves value converted to string.
If value is a byte array, then it gets converted to string using Latin1 encoding encoder.
public ToString ( ) : string
Résultat string