Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TdxGPImageCodecBMP.CanLoadStream(TStream) Method

Identifies if the codec can load an image stored in the specified stream.

#Declaration

Delphi
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 device-independent bitmap (that is, DIB or BMP) image that starts from its current position. The class function returns True if the stream’s content at the current position starts with the $42$4D bytes that correspond to the ‘BM’ ASCII characters; otherwise, False.

Note

The CanLoadStream function restores the state the stream had prior to an attempt to read the first two bytes regardless of its success.

See Also