Class ExifBitConverter
Converts between exif data types and array of bytes.
Inheritance
System.Object
ExifBitConverter
Assembly: ExifLibrary.dll
Syntax
public class ExifBitConverter : BitConverterEx
Constructors
|
Improve this Doc
View Source
ExifBitConverter(BitConverterEx.ByteOrder, BitConverterEx.ByteOrder)
Declaration
public ExifBitConverter(BitConverterEx.ByteOrder from, BitConverterEx.ByteOrder to)
Parameters
Methods
|
Improve this Doc
View Source
GetBytes(MathEx.Fraction32, BitConverterEx.ByteOrder)
Converts the given signed rational number to an array of bytes.
Numbers are converted from the platform byte-order to the given byte-order.
Declaration
public static byte[] GetBytes(MathEx.Fraction32 value, BitConverterEx.ByteOrder tobyteorder)
Parameters
Returns
Type |
Description |
System.Byte[] |
|
|
Improve this Doc
View Source
GetBytes(MathEx.Fraction32[], BitConverterEx.ByteOrder)
Converts the given array of signed rationals to an array of bytes.
Numbers are converted from the platform byte-order to the given byte-order.
Declaration
public static byte[] GetBytes(MathEx.Fraction32[] value, BitConverterEx.ByteOrder tobyteorder)
Parameters
Returns
Type |
Description |
System.Byte[] |
|
|
Improve this Doc
View Source
GetBytes(MathEx.UFraction32, BitConverterEx.ByteOrder)
Converts the given unsigned rational number to an array of bytes.
Numbers are converted from the platform byte-order to the given byte-order.
Declaration
public static byte[] GetBytes(MathEx.UFraction32 value, BitConverterEx.ByteOrder tobyteorder)
Parameters
Returns
Type |
Description |
System.Byte[] |
|
|
Improve this Doc
View Source
GetBytes(MathEx.UFraction32[], BitConverterEx.ByteOrder)
Converts the given array of unsigned rationals to an array of bytes.
Numbers are converted from the platform byte-order to the given byte-order.
Declaration
public static byte[] GetBytes(MathEx.UFraction32[] value, BitConverterEx.ByteOrder tobyteorder)
Parameters
Returns
Type |
Description |
System.Byte[] |
|
|
Improve this Doc
View Source
GetBytes(DateTime, Boolean)
Converts the given datetime to an array of bytes with a null terminator.
Declaration
public static byte[] GetBytes(DateTime value, bool hastime)
Parameters
Type |
Name |
Description |
System.DateTime |
value |
|
System.Boolean |
hastime |
|
Returns
Type |
Description |
System.Byte[] |
|
|
Improve this Doc
View Source
GetBytes(Double[], BitConverterEx.ByteOrder)
Converts the given array of 64-bit floating numbers to an array of bytes.
Numbers are converted from the platform byte-order to the given byte-order.
Declaration
public static byte[] GetBytes(double[] value, BitConverterEx.ByteOrder tobyteorder)
Parameters
Returns
Type |
Description |
System.Byte[] |
|
|
Improve this Doc
View Source
GetBytes(Int16[], BitConverterEx.ByteOrder)
Converts the given array of 16-bit signed integers to an array of bytes.
Numbers are converted from the platform byte-order to the given byte-order.
Declaration
public static byte[] GetBytes(short[] value, BitConverterEx.ByteOrder tobyteorder)
Parameters
Returns
Type |
Description |
System.Byte[] |
|
|
Improve this Doc
View Source
GetBytes(Int32[], BitConverterEx.ByteOrder)
Converts the given array of 32-bit signed integers to an array of bytes.
Numbers are converted from the platform byte-order to the given byte-order.
Declaration
public static byte[] GetBytes(int[] value, BitConverterEx.ByteOrder tobyteorder)
Parameters
Returns
Type |
Description |
System.Byte[] |
|
|
Improve this Doc
View Source
GetBytes(Single[], BitConverterEx.ByteOrder)
Converts the given array of 32-bit floating numbers to an array of bytes.
Numbers are converted from the platform byte-order to the given byte-order.
Declaration
public static byte[] GetBytes(float[] value, BitConverterEx.ByteOrder tobyteorder)
Parameters
Returns
Type |
Description |
System.Byte[] |
|
|
Improve this Doc
View Source
GetBytes(String, Boolean, Encoding)
Converts the given ascii string to an array of bytes optionally adding a null terminator.
Declaration
public static byte[] GetBytes(string value, bool addnull, Encoding encoding)
Parameters
Type |
Name |
Description |
System.String |
value |
|
System.Boolean |
addnull |
|
System.Text.Encoding |
encoding |
|
Returns
Type |
Description |
System.Byte[] |
|
|
Improve this Doc
View Source
GetBytes(String, Encoding)
Converts the given ascii string to an array of bytes without adding a null terminator.
Declaration
public static byte[] GetBytes(string value, Encoding encoding)
Parameters
Type |
Name |
Description |
System.String |
value |
|
System.Text.Encoding |
encoding |
|
Returns
Type |
Description |
System.Byte[] |
|
|
Improve this Doc
View Source
GetBytes(UInt16[], BitConverterEx.ByteOrder)
Converts the given array of 16-bit unsigned integers to an array of bytes.
Numbers are converted from the platform byte-order to the given byte-order.
Declaration
public static byte[] GetBytes(ushort[] value, BitConverterEx.ByteOrder tobyteorder)
Parameters
Returns
Type |
Description |
System.Byte[] |
|
|
Improve this Doc
View Source
GetBytes(UInt32[], BitConverterEx.ByteOrder)
Converts the given array of 32-bit unsigned integers to an array of bytes.
Numbers are converted from the platform byte-order to the given byte-order.
Declaration
public static byte[] GetBytes(uint[] value, BitConverterEx.ByteOrder tobyteorder)
Parameters
Returns
Type |
Description |
System.Byte[] |
|
|
Improve this Doc
View Source
ToAscii(Byte[], Boolean, Encoding)
Returns an ASCII string converted from the given byte array.
Declaration
public static string ToAscii(byte[] data, bool endatfirstnull, Encoding encoding)
Parameters
Type |
Name |
Description |
System.Byte[] |
data |
|
System.Boolean |
endatfirstnull |
|
System.Text.Encoding |
encoding |
|
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
ToAscii(Byte[], Encoding)
Returns an ASCII string converted from the given byte array.
Declaration
public static string ToAscii(byte[] data, Encoding encoding)
Parameters
Type |
Name |
Description |
System.Byte[] |
data |
|
System.Text.Encoding |
encoding |
|
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
ToDateTime(Byte[])
Returns a DateTime object converted from the given byte array.
Declaration
public static DateTime ToDateTime(byte[] data)
Parameters
Type |
Name |
Description |
System.Byte[] |
data |
|
Returns
Type |
Description |
System.DateTime |
|
|
Improve this Doc
View Source
ToDateTime(Byte[], Boolean)
Returns a DateTime object converted from the given byte array.
Declaration
public static DateTime ToDateTime(byte[] data, bool hastime)
Parameters
Type |
Name |
Description |
System.Byte[] |
data |
|
System.Boolean |
hastime |
|
Returns
Type |
Description |
System.DateTime |
|
|
Improve this Doc
View Source
ToDoubleArray(Byte[], Int32, BitConverterEx.ByteOrder)
Returns an array of 64-bit floating numbers converted from
the given byte array.
Numbers are converted from the given byte-order to platform byte-order.
Declaration
public static double[] ToDoubleArray(byte[] data, int count, BitConverterEx.ByteOrder frombyteorder)
Parameters
Returns
Type |
Description |
System.Double[] |
|
|
Improve this Doc
View Source
ToSingleArray(Byte[], Int32, BitConverterEx.ByteOrder)
Returns an array of 32-bit floating numbers converted from
the given byte array.
Numbers are converted from the given byte-order to platform byte-order.
Declaration
public static float[] ToSingleArray(byte[] data, int count, BitConverterEx.ByteOrder frombyteorder)
Parameters
Returns
Type |
Description |
System.Single[] |
|
|
Improve this Doc
View Source
ToSIntArray(Byte[], Int32, BitConverterEx.ByteOrder)
Returns an array of 32-bit signed integers converted from
the given byte array.
Numbers are converted from the given byte-order to platform byte-order.
Declaration
public static int[] ToSIntArray(byte[] data, int count, BitConverterEx.ByteOrder byteorder)
Parameters
Returns
Type |
Description |
System.Int32[] |
|
|
Improve this Doc
View Source
ToSRational(Byte[], BitConverterEx.ByteOrder)
Returns a signed rational number converted from the first
eight bytes of the given byte array. The first four bytes are
assumed to be the numerator and the next four bytes are the
denumerator.
Numbers are converted from the given byte-order to platform byte-order.
Declaration
public static MathEx.Fraction32 ToSRational(byte[] data, BitConverterEx.ByteOrder frombyteorder)
Parameters
Returns
|
Improve this Doc
View Source
ToSRationalArray(Byte[], Int32, BitConverterEx.ByteOrder)
Returns an array of signed rational numbers converted from
the given byte array.
Numbers are converted from the given byte-order to platform byte-order.
Declaration
public static MathEx.Fraction32[] ToSRationalArray(byte[] data, int count, BitConverterEx.ByteOrder frombyteorder)
Parameters
Returns
|
Improve this Doc
View Source
ToSShortArray(Byte[], Int32, BitConverterEx.ByteOrder)
Returns an array of 16-bit signed integers converted from
the given byte array.
Numbers are converted from the given byte-order to platform byte-order.
Declaration
public static short[] ToSShortArray(byte[] data, int count, BitConverterEx.ByteOrder frombyteorder)
Parameters
Returns
Type |
Description |
System.Int16[] |
|
|
Improve this Doc
View Source
ToString(Byte[])
Returns a string converted from the given byte array.
from the numeric value of each byte.
Declaration
public static string ToString(byte[] data)
Parameters
Type |
Name |
Description |
System.Byte[] |
data |
|
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
ToUIntArray(Byte[], Int32, BitConverterEx.ByteOrder)
Returns an array of 32-bit unsigned integers converted from
the given byte array.
Numbers are converted from the given byte-order to platform byte-order.
Declaration
public static uint[] ToUIntArray(byte[] data, int count, BitConverterEx.ByteOrder frombyteorder)
Parameters
Returns
Type |
Description |
System.UInt32[] |
|
|
Improve this Doc
View Source
ToURational(Byte[], BitConverterEx.ByteOrder)
Returns an unsigned rational number converted from the first
eight bytes of the given byte array. The first four bytes are
assumed to be the numerator and the next four bytes are the
denumerator.
Numbers are converted from the given byte-order to platform byte-order.
Declaration
public static MathEx.UFraction32 ToURational(byte[] data, BitConverterEx.ByteOrder frombyteorder)
Parameters
Returns
|
Improve this Doc
View Source
ToURationalArray(Byte[], Int32, BitConverterEx.ByteOrder)
Returns an array of unsigned rational numbers converted from
the given byte array.
Numbers are converted from the given byte-order to platform byte-order.
Declaration
public static MathEx.UFraction32[] ToURationalArray(byte[] data, int count, BitConverterEx.ByteOrder frombyteorder)
Parameters
Returns
|
Improve this Doc
View Source
ToUShortArray(Byte[], Int32, BitConverterEx.ByteOrder)
Returns an array of 16-bit unsigned integers converted from
the given byte array.
Numbers are converted from the given byte-order to platform byte-order.
Declaration
public static ushort[] ToUShortArray(byte[] data, int count, BitConverterEx.ByteOrder frombyteorder)
Parameters
Returns
Type |
Description |
System.UInt16[] |
|