TTMSFNCUtils.GetImageType Method
Detects the image file extension represented by stream header bytes.
API unit family: TMSFNCUtils
Declaring type: TTMSFNCUtils
Overloads
Overload 1
Detects the image file extension represented by stream header bytes.
class function GetImageType(AData: TStream; AResetPosition: Boolean = True): string; overload;
Parameters
| Name | Description |
|---|---|
AData |
Stream containing image data. |
AResetPosition |
When True, reads from the beginning of the stream; the original position is restored afterward. |
Returns
Detected extension such as .png, .jpg, or an empty string when no known header is found.
Overload 2
Detects the image file extension represented by a bitmap.
class function GetImageType(ABitmap: TTMSFNCBitmap; AResetPosition: Boolean = True): string; overload;
Parameters
| Name | Description |
|---|---|
ABitmap |
Bitmap to inspect. |
AResetPosition |
Reserved for overload compatibility. |
Returns
Detected extension such as .png, .jpg, or an empty string when no known header is found.