C# Class ImageProcessor.Imaging.MetaData.ExifBitConverter

The exif bit converter. Converts based on the endianness of the current machine.
Inheritance: ImageProcessor.Imaging.Helpers.EndianBitConverter
ファイルを表示 Open project: JimBobSquarePants/ImageProcessor Class Usage Examples

Public Methods

Method 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.

Protected Methods

Method 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 method

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
return void

ExifBitConverter() public method

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

FromBytes() protected method

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
return long

GetBytes() public method

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

GetBytes() public method

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

GetBytes() public method

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.
return byte[]

GetBytes() public method

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.
return byte[]

IsLittleEndian() public method

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
return bool