[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'Graphics' (#lcl)

# TCustomIcon.IsStreamFormatSupported

Indicates whether the specified stream contains image data with a format supported for use in derived TCustomIcon classes.

## Declaration

Source position: graphics.pp line 1638

`protected class function TCustomIcon.IsStreamFormatSupported(`
`Stream: TStream`
`):Boolean; override;`

## Arguments

`Stream` |  | TStream instance with the image data examined in the method.

## Function result

Returns True if the stream starts with the StreamSignature needed for a graphic class type.

## Description

IsStreamFormatSupported is an overridden Boolean class function in TCustomIcon used to check whether the image data stored in Stream uses the StreamSignature required for an icon class instance. It overrides the method implemented in TGraphic which always returns False. While IsStreamFormatSupported() has been implemented for other graphics classes like TPortableNetworkGraphics, TBitmap, TJpegImage, etc., it was missing in TCustomIcon and its descendants TIcon and TCursorImage in versions prior to LCL 4.4.

IsStreamFormatSupported returns True if the data stored in Stream starts with the four byte StreamSignature required for an icon class instance. The position in Stream is saved before reading the byte values, and restored when the read operation is complete.

Please note that TCustomIcon does not define the value for StreamSignature - it is defined in descendent classes like TIcon and TCursorImage which implement custom GetStreamSignature methods for the image types.

## Version info

Added in LCL version 4.4.

## See also

TCustomIcon.GetStreamSignature |  | Gets the stream signature used for icon data.
TIcon.GetStreamSignature |  | Gets the stream signature used for icon data.
TCursorImage.GetStreamSignature |  | Gets the stream signature used for icon data.
TGraphic.IsStreamFormatSupported |  | Indicates whether the specified stream type is supported in the class.
TGraphicClass |  | TGraphicClass - class of TGraphic.
TPicture.Graphic |  | Graphic - The TGraphic object contained by the TPicture.
GetGraphicClassForFileExtension |  | Gets the TGraphicClass instance used for images with the specified file extension.