TdxGPImageCodecGIF.CanLoadStream(TStream) Method
Identifies if the codec can load an image stored in the specified stream.
Declaration
class function CanLoadStream(AStream: TStream): Boolean; override;
Parameters
Name | Type |
---|---|
AStream | TStream |
Returns
Type |
---|
Boolean |
Remarks
You can call this class function and pass a stream as the AStream parameter to identify if the stream contains a GIF image that starts from its current position. The class function returns True if the ‘GIF87a’ or ‘GIF89a’ header is located at the current stream position; otherwise, False. These headers (that is, “magic numbers” or file signatures interpreted as ASCII characters) indicate the supported GIF 87a (original) and 89a (enhanced) image format standards.
Note
The CanLoadStream function restores the state the stream had prior to a header read attempt regardless of its success.
See Also