Show / Hide Table of Contents

Class ExifBitConverter

Converts between exif data types and array of bytes.

Inheritance
System.Object
BitConverterEx
ExifBitConverter
Inherited Members
BitConverterEx.SystemByteOrder
BitConverterEx.LittleEndian
BitConverterEx.BigEndian
BitConverterEx.SystemEndian
BitConverterEx.ToChar(Byte[], Int64, BitConverterEx.ByteOrder, BitConverterEx.ByteOrder)
BitConverterEx.ToUInt16(Byte[], Int64, BitConverterEx.ByteOrder, BitConverterEx.ByteOrder)
BitConverterEx.ToUInt32(Byte[], Int64, BitConverterEx.ByteOrder, BitConverterEx.ByteOrder)
BitConverterEx.ToUInt64(Byte[], Int64, BitConverterEx.ByteOrder, BitConverterEx.ByteOrder)
BitConverterEx.ToInt16(Byte[], Int64, BitConverterEx.ByteOrder, BitConverterEx.ByteOrder)
BitConverterEx.ToInt32(Byte[], Int64, BitConverterEx.ByteOrder, BitConverterEx.ByteOrder)
BitConverterEx.ToInt64(Byte[], Int64, BitConverterEx.ByteOrder, BitConverterEx.ByteOrder)
BitConverterEx.ToSingle(Byte[], Int64, BitConverterEx.ByteOrder, BitConverterEx.ByteOrder)
BitConverterEx.ToDouble(Byte[], Int64, BitConverterEx.ByteOrder, BitConverterEx.ByteOrder)
BitConverterEx.GetBytes(UInt16, BitConverterEx.ByteOrder, BitConverterEx.ByteOrder)
BitConverterEx.GetBytes(UInt32, BitConverterEx.ByteOrder, BitConverterEx.ByteOrder)
BitConverterEx.GetBytes(UInt64, BitConverterEx.ByteOrder, BitConverterEx.ByteOrder)
BitConverterEx.GetBytes(Int16, BitConverterEx.ByteOrder, BitConverterEx.ByteOrder)
BitConverterEx.GetBytes(Int32, BitConverterEx.ByteOrder, BitConverterEx.ByteOrder)
BitConverterEx.GetBytes(Int64, BitConverterEx.ByteOrder, BitConverterEx.ByteOrder)
BitConverterEx.GetBytes(Single, BitConverterEx.ByteOrder, BitConverterEx.ByteOrder)
BitConverterEx.GetBytes(Double, BitConverterEx.ByteOrder, BitConverterEx.ByteOrder)
BitConverterEx.ToChar(Byte[], Int64)
BitConverterEx.ToUInt16(Byte[], Int64)
BitConverterEx.ToUInt32(Byte[], Int64)
BitConverterEx.ToUInt64(Byte[], Int64)
BitConverterEx.ToInt16(Byte[], Int64)
BitConverterEx.ToInt32(Byte[], Int64)
BitConverterEx.ToInt64(Byte[], Int64)
BitConverterEx.ToSingle(Byte[], Int64)
BitConverterEx.ToDouble(Byte[], Int64)
BitConverterEx.GetBytes(UInt16)
BitConverterEx.GetBytes(UInt32)
BitConverterEx.GetBytes(UInt64)
BitConverterEx.GetBytes(Int16)
BitConverterEx.GetBytes(Int32)
BitConverterEx.GetBytes(Int64)
BitConverterEx.GetBytes(Single)
BitConverterEx.GetBytes(Double)
Namespace: ExifLibrary
Assembly: ExifLibrary.dll
Syntax
public class ExifBitConverter : BitConverterEx

Constructors

| Improve this Doc View Source

ExifBitConverter(BitConverterEx.ByteOrder, BitConverterEx.ByteOrder)

Intializes a new instance of the ExifBitConverter class.

Declaration
public ExifBitConverter(BitConverterEx.ByteOrder from, BitConverterEx.ByteOrder to)
Parameters
Type Name Description
BitConverterEx.ByteOrder from

The byte order to convert from.

BitConverterEx.ByteOrder to

The byte order to convert to.

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
Type Name Description
MathEx.Fraction32 value
BitConverterEx.ByteOrder tobyteorder
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
Type Name Description
MathEx.Fraction32[] value
BitConverterEx.ByteOrder tobyteorder
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
Type Name Description
MathEx.UFraction32 value
BitConverterEx.ByteOrder tobyteorder
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
Type Name Description
MathEx.UFraction32[] value
BitConverterEx.ByteOrder tobyteorder
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
Type Name Description
System.Double[] value
BitConverterEx.ByteOrder tobyteorder
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
Type Name Description
System.Int16[] value
BitConverterEx.ByteOrder tobyteorder
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
Type Name Description
System.Int32[] value
BitConverterEx.ByteOrder tobyteorder
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
Type Name Description
System.Single[] value
BitConverterEx.ByteOrder tobyteorder
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
Type Name Description
System.UInt16[] value
BitConverterEx.ByteOrder tobyteorder
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
Type Name Description
System.UInt32[] value
BitConverterEx.ByteOrder tobyteorder
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
Type Name Description
System.Byte[] data
System.Int32 count
BitConverterEx.ByteOrder frombyteorder
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
Type Name Description
System.Byte[] data
System.Int32 count
BitConverterEx.ByteOrder frombyteorder
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
Type Name Description
System.Byte[] data
System.Int32 count
BitConverterEx.ByteOrder byteorder
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
Type Name Description
System.Byte[] data
BitConverterEx.ByteOrder frombyteorder
Returns
Type Description
MathEx.Fraction32
| 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
Type Name Description
System.Byte[] data
System.Int32 count
BitConverterEx.ByteOrder frombyteorder
Returns
Type Description
MathEx.Fraction32[]
| 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
Type Name Description
System.Byte[] data
System.Int32 count
BitConverterEx.ByteOrder frombyteorder
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
Type Name Description
System.Byte[] data
System.Int32 count
BitConverterEx.ByteOrder frombyteorder
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
Type Name Description
System.Byte[] data
BitConverterEx.ByteOrder frombyteorder
Returns
Type Description
MathEx.UFraction32
| 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
Type Name Description
System.Byte[] data
System.Int32 count
BitConverterEx.ByteOrder frombyteorder
Returns
Type Description
MathEx.UFraction32[]
| 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
Type Name Description
System.Byte[] data
System.Int32 count
BitConverterEx.ByteOrder frombyteorder
Returns
Type Description
System.UInt16[]
Back to top Copyright © 2019 Özgür Özçıtak