TBLImageCodec
Image codec.
Provides a unified interface for inspecting image data and creating image decoders & encoders.
Definition
Unit: Blend2D
Properties
| Name | Description |
|---|---|
| BuiltInCodecs | Built-in codecs, which are present in a global registry. |
| Extensions | A list of file extensions used to store image of this codec, separated by ' |
| Features | Image codec flags. |
| IsValid | Tests whether the image codec is not a built-in null instance. |
| MimeType | A mime-type associated with the image codec's format. |
| Name | Image codec name (i.e, "PNG", "JPEG", etc...). |
| Vendor | The image codec vendor (i.e. "Blend2D" for all built-in codecs). |
Constructors
| Name | Description |
|---|---|
| Assign | Creates a copy of the AOther image codec. |
| Finalize | Destroys the image codec and releases all resources allocated by it. |
| Initialize | Creates a new default-initialized image codec. |
Operators
| Name | Description |
|---|---|
| Equal(TBLImageCodec, TBLImageCodec) | Returns True if two image codecs are equal. |
| Equal(TBLImageCodec, Pointer) | Used to compare against nil. |
| NotEqual(TBLImageCodec, TBLImageCodec) | Returns True if two image codecs are not equal. |
| NotEqual(TBLImageCodec, Pointer) | Used to compare against nil. |
Methods
| Name | Description |
|---|---|
| AddToBuiltIn | Adds a codec to a global built-in codecs registry. |
| CreateDecoder | |
| CreateEncoder | |
| Equals | |
| FindByData(TBytes, TBLArray<TBLImageCodec>) | |
| FindByData(TBytes) | |
| FindByData(TBLArray<Byte>, TBLArray<TBLImageCodec>) | |
| FindByData(TBLArray<Byte>) | |
| FindByData(TBLArrayView<Byte>, TBLArray<TBLImageCodec>) | |
| FindByData(TBLArrayView<Byte>) | |
| FindByData(Pointer, NativeInt, TBLArray<TBLImageCodec>) | |
| FindByData(Pointer, NativeInt) | |
| FindByExtension(TBLStringView, TBLArray<TBLImageCodec>) | |
| FindByExtension(TBLStringView) | |
| FindByExtension(String, TBLArray<TBLImageCodec>) | |
| FindByExtension(String) | |
| FindByName(TBLStringView, TBLArray<TBLImageCodec>) | |
| FindByName(TBLStringView) | |
| FindByName(String, TBLArray<TBLImageCodec>) | |
| FindByName(String) | |
| HasFeature | Tests whether the image codec has the given feature. |
| InspectData(Pointer, NativeInt) | |
| InspectData(TBLArrayView<Byte>) | |
| InspectData(TBytes) | |
| InspectData(TBLArray<Byte>) | |
| RemoveFromBuiltIn | Removes a codec from a global built-in codecs registry. |
| Reset | |
| Swap |
Property Descriptions
BuiltInCodecs
Built-in codecs, which are present in a global registry.
class property BuiltInCodecs: TBLArray<TBLImageCodec> read GetBuiltInCodecs
Type: TBLArray<TBLImageCodec>
Exceptions
EBlend2DError: Raised on failure.
Extensions
A list of file extensions used to store image of this codec, separated by '|' character.
property Extensions: TBLString read GetExtensions
Type: TBLString
Features
Image codec flags.
property Features: TBLImageCodecFeatures read GetFeatures
Type: TBLImageCodecFeatures
IsValid
Tests whether the image codec is not a built-in null instance.
property IsValid: Boolean read GetIsValid
Type: Boolean
MimeType
A mime-type associated with the image codec's format.
property MimeType: TBLString read GetMimeType
Type: TBLString
Name
Image codec name (i.e, "PNG", "JPEG", etc...).
property Name: TBLString read GetName
Type: TBLString
Vendor
The image codec vendor (i.e. "Blend2D" for all built-in codecs).
property Vendor: TBLString read GetVendor
Type: TBLString
Constructor Descriptions
Assign
Creates a copy of the AOther image codec.
constructor Assign(var ADest: TBLImageCodec; const ASrc: TBLImageCodec); inline
Parameters
ADest: TBLImageCodec
ASrc: TBLImageCodec
Exceptions
EBlend2DError: Raised on failure.
Finalize
Destroys the image codec and releases all resources allocated by it.
destructor Finalize(var ADest: TBLImageCodec)
Parameters
ADest: TBLImageCodec
Exceptions
EBlend2DError: Raised on failure.
Initialize
Creates a new default-initialized image codec.
constructor Initialize(out ADest: TBLImageCodec)
Parameters
ADest: TBLImageCodec
Exceptions
EBlend2DError: Raised on failure.
Operator Descriptions
Equal(TBLImageCodec, TBLImageCodec)
Returns True if two image codecs are equal.
class operator Equal(const ALeft, ARight: TBLImageCodec): Boolean; inline; static
Parameters
ALeft: TBLImageCodec
ARight: TBLImageCodec
Returns
Boolean
Equal(TBLImageCodec, Pointer)
Used to compare against nil.
class operator Equal(const ALeft: TBLImageCodec; const ARight: Pointer): Boolean; inline; static
Parameters
ALeft: TBLImageCodec
ARight: Pointer
Returns
Boolean
NotEqual(TBLImageCodec, TBLImageCodec)
Returns True if two image codecs are not equal.
class operator NotEqual(const ALeft, ARight: TBLImageCodec): Boolean; inline; static
Parameters
ALeft: TBLImageCodec
ARight: TBLImageCodec
Returns
Boolean
NotEqual(TBLImageCodec, Pointer)
Used to compare against nil.
class operator NotEqual(const ALeft: TBLImageCodec; const ARight: Pointer): Boolean; inline; static
Parameters
ALeft: TBLImageCodec
ARight: Pointer
Returns
Boolean
Method Descriptions
AddToBuiltIn(TBLImageCodec)
Adds a codec to a global built-in codecs registry.
class procedure AddToBuiltIn(const ACodec: TBLImageCodec); inline; static
Exceptions
EBlend2DError: Raised on failure.
Parameters
ACodec: TBLImageCodec
CreateDecoder
function CreateDecoder: TBLImageDecoder; inline
Returns
CreateEncoder
function CreateEncoder: TBLImageEncoder; inline
Returns
Equals(TBLImageCodec)
function Equals(const AOther: TBLImageCodec): Boolean; inline
Parameters
AOther: TBLImageCodec
Returns
Boolean
FindByData(TBytes, TBLArray<TBLImageCodec>)
procedure FindByData(const ABuffer: TBytes; const ACodecs: TBLArray<TBLImageCodec>); overload; inline
Parameters
ABuffer: TBytes
ACodecs: TBLArray<TBLImageCodec>
FindByData(TBytes)
procedure FindByData(const ABuffer: TBytes); overload; inline
Parameters
ABuffer: TBytes
FindByData(TBLArray<Byte>, TBLArray<TBLImageCodec>)
procedure FindByData(const ABuffer, ACodecs: TBLArray<TBLImageCodec>); overload; inline
Parameters
ABuffer: TBLArray<Byte>
ACodecs: TBLArray<TBLImageCodec>
FindByData(TBLArray<Byte>)
procedure FindByData(const ABuffer: TBLArray<Byte>); overload; inline
Parameters
ABuffer: TBLArray<Byte>
FindByData(TBLArrayView<Byte>, TBLArray<TBLImageCodec>)
procedure FindByData(const AView: TBLArrayView<Byte>; const ACodecs: TBLArray<TBLImageCodec>); overload; inline
Parameters
AView: TBLArrayView<Byte>
ACodecs: TBLArray<TBLImageCodec>
FindByData(TBLArrayView<Byte>)
procedure FindByData(const AView: TBLArrayView<Byte>); overload; inline
Parameters
AView: TBLArrayView<Byte>
FindByData(Pointer, NativeInt, TBLArray<TBLImageCodec>)
procedure FindByData(const AData: Pointer; const ASize: NativeInt; const ACodecs: TBLArray<TBLImageCodec>); overload; inline
Parameters
AData: Pointer
ASize: NativeInt
ACodecs: TBLArray<TBLImageCodec>
FindByData(Pointer, NativeInt)
procedure FindByData(const AData: Pointer; const ASize: NativeInt); overload; inline
Parameters
AData: Pointer
ASize: NativeInt
FindByExtension(TBLStringView, TBLArray<TBLImageCodec>)
procedure FindByExtension(const AExt: TBLStringView; const ACodecs: TBLArray<TBLImageCodec>); overload; inline
Parameters
AExt: TBLStringView
ACodecs: TBLArray<TBLImageCodec>
FindByExtension(TBLStringView)
procedure FindByExtension(const AExt: TBLStringView); overload; inline
Parameters
AExt: TBLStringView
FindByExtension(String, TBLArray<TBLImageCodec>)
procedure FindByExtension(const AExt: String; const ACodecs: TBLArray<TBLImageCodec>); overload; inline
Parameters
AExt: String
ACodecs: TBLArray<TBLImageCodec>
FindByExtension(String)
procedure FindByExtension(const AExt: String); overload; inline
Parameters
AExt: String
FindByName(TBLStringView, TBLArray<TBLImageCodec>)
procedure FindByName(const AName: TBLStringView; const ACodecs: TBLArray<TBLImageCodec>); overload; inline
Parameters
AName: TBLStringView
ACodecs: TBLArray<TBLImageCodec>
FindByName(TBLStringView)
procedure FindByName(const AName: TBLStringView); overload; inline
Parameters
AName: TBLStringView
FindByName(String, TBLArray<TBLImageCodec>)
procedure FindByName(const AName: String; const ACodecs: TBLArray<TBLImageCodec>); overload; inline
Parameters
AName: String
ACodecs: TBLArray<TBLImageCodec>
FindByName(String)
procedure FindByName(const AName: String); overload; inline
Parameters
AName: String
HasFeature(TBLImageCodecFeature)
Tests whether the image codec has the given feature.
function HasFeature(const AFeature: TBLImageCodecFeature): Boolean; inline
Parameters
AFeature: TBLImageCodecFeature
Returns
Boolean
InspectData(Pointer, NativeInt)
function InspectData(const AData: Pointer; const ASize: NativeInt): Cardinal; overload; inline
Parameters
AData: Pointer
ASize: NativeInt
Returns
Cardinal
InspectData(TBLArrayView<Byte>)
function InspectData(const AView: TBLArrayView<Byte>): Cardinal; overload; inline
Parameters
AView: TBLArrayView<Byte>
Returns
Cardinal
InspectData(TBytes)
function InspectData(const ABuffer: TBytes): Cardinal; overload; inline
Parameters
ABuffer: TBytes
Returns
Cardinal
InspectData(TBLArray<Byte>)
function InspectData(const ABuffer: TBLArray<Byte>): Cardinal; overload; inline
Parameters
ABuffer: TBLArray<Byte>
Returns
Cardinal
RemoveFromBuiltIn(TBLImageCodec)
Removes a codec from a global built-in codecs registry.
class procedure RemoveFromBuiltIn(const ACodec: TBLImageCodec); inline; static
Exceptions
EBlend2DError: Raised on failure.
Parameters
ACodec: TBLImageCodec
Reset
procedure Reset; inline
Swap(TBLImageCodec)
procedure Swap(var AOther: TBLImageCodec); inline
Parameters
AOther: TBLImageCodec