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

TBitmap.LoadFromStream

Loads image data from the specified stream.

Declaration

Source position: graphics.pp line 1450

public procedure TBitmap.LoadFromStream(

  AStream: TStream;

  ASize: Cardinal

); override;

Arguments

AStream

  

Stream instance with the image data loaded in the method.

ASize

  

Number of bytes to read in the method.

Description

LoadFromStream is an overridden method used to read data for the image from the TStream instance specified in AStream. ASize contains the number of bytes to read in the method.

LoadFromStream provides supported for reading the image data from a resource stream. When AStream is a TResourceStream instance, an image header included in the stream is handled. This includes allocating additional storage for the header, and setting the type and size of the image header using the correct endian handling for bytes as needed for the platform.

LoadFromStream calls the inherited method to read the image data (including the header for a resource stream).

See also

TRasterImage.LoadFromStream

  

LoadFromStream - loads data for the image from a specified data stream, optionally supplying its size.

TResourceStream