C# Class ImageProcessor.Imaging.MetaData.ExifBitConverter

The exif bit converter. Converts based on the endianness of the current machine.
Inheritance: ImageProcessor.Imaging.Helpers.EndianBitConverter
Afficher le fichier Open project: JimBobSquarePants/ImageProcessor Class Usage Examples

Méthodes publiques

Méthode Description
ExifBitConverter ( IComputerArchitectureInfo computerArchitectureInfo ) : System

Initializes a new instance of the ExifBitConverter class.

GetBytes ( Rational value ) : byte[]

Converts the given signed rational number to an array of bytes.

GetBytes ( Rational value ) : byte[]

Converts the given unsigned rational number to an array of bytes.

GetBytes ( string value ) : byte[]

Converts the given ascii string to an array of bytes without adding a null terminator.

GetBytes ( string value, bool addnull ) : byte[]

Converts the given ascii string to an array of bytes optionally adding a null terminator.

IsLittleEndian ( ) : bool

Indicates the byte order ("endianness") in which data is converted using this class.

Different computer architectures store data using different byte orders. "Big-endian" means the most significant byte is on the left end of a word. "Little-endian" means the most significant byte is on the right end of a word.

Méthodes protégées

Méthode Description
CopyBytesImpl ( long value, int bytes, byte buffer, int index ) : void

Copies the given number of bytes from the least-specific end of the specified value into the specified byte array, beginning at the specified index. This must be implemented in concrete derived classes, but the implementation may assume that the value will fit into the buffer.

FromBytes ( byte value, int startIndex, int bytesToConvert ) : long

Convert the given number of bytes from the given array, from the given start position, into a long, using the bytes as the least significant part of the long. By the time this is called, the arguments have been checked for validity.

Method Details

CopyBytesImpl() protected méthode

Copies the given number of bytes from the least-specific end of the specified value into the specified byte array, beginning at the specified index. This must be implemented in concrete derived classes, but the implementation may assume that the value will fit into the buffer.
protected CopyBytesImpl ( long value, int bytes, byte buffer, int index ) : void
value long The value to copy bytes for
bytes int The number of significant bytes to copy
buffer byte The byte array to copy the bytes into
index int The first index into the array to copy the bytes into
Résultat void

ExifBitConverter() public méthode

Initializes a new instance of the ExifBitConverter class.
public ExifBitConverter ( IComputerArchitectureInfo computerArchitectureInfo ) : System
computerArchitectureInfo IComputerArchitectureInfo /// The computer architecture info. ///
Résultat System

FromBytes() protected méthode

Convert the given number of bytes from the given array, from the given start position, into a long, using the bytes as the least significant part of the long. By the time this is called, the arguments have been checked for validity.
protected FromBytes ( byte value, int startIndex, int bytesToConvert ) : long
value byte The bytes to convert
startIndex int The index of the first byte to convert
bytesToConvert int The number of bytes to use in the conversion
Résultat long

GetBytes() public méthode

Converts the given signed rational number to an array of bytes.
public GetBytes ( Rational value ) : byte[]
value Rational /// The containing the numerator and denominator. ///
Résultat byte[]

GetBytes() public méthode

Converts the given unsigned rational number to an array of bytes.
public GetBytes ( Rational value ) : byte[]
value Rational /// The containing the numerator and denominator. ///
Résultat byte[]

GetBytes() public méthode

Converts the given ascii string to an array of bytes without adding a null terminator.
public GetBytes ( string value ) : byte[]
value string The string to convert.
Résultat byte[]

GetBytes() public méthode

Converts the given ascii string to an array of bytes optionally adding a null terminator.
public GetBytes ( string value, bool addnull ) : byte[]
value string The string to convert
addnull bool Whether to add a null terminator to the end of the string.
Résultat byte[]

IsLittleEndian() public méthode

Indicates the byte order ("endianness") in which data is converted using this class.
Different computer architectures store data using different byte orders. "Big-endian" means the most significant byte is on the left end of a word. "Little-endian" means the most significant byte is on the right end of a word.
public IsLittleEndian ( ) : bool
Résultat bool