TRasterImage.LoadFromStream procedure
LoadFromStream - loads data for the image from a specified data
stream, optionally supplying its size.Declaration
procedure LoadFromStream(AStream: TStream); override; overload
procedure LoadFromStream(AStream: TStream; ASize: Cardinal); virtual
; overloadArguments
AStream | Stream with the image data loaded in the method. |
ASize | Number of byte to read from the stream. |
Description
LoadFromStream is an overloaded method in
TRasterImage
used to load image data from the
TStream instance specified in
AStream.
One of the overloaded variants provides an ASize argument which
contains the number of bytes to read from the stream. When the ASize argument
is omitted, the remaining content in the stream is read starting at the
current position in the stream.
LoadFromStream calls BeginUpdate to increment the internal update
counter in the class instance. EndUpdate is called when the stream
has been processed in the method.
LoadFromStream discards an existing shared image and its save stream, and clears existing handles and raw image data in the class instance. No additional actions are performed in the method when ASize is 0 (zero).
LoadFromStream re-creates the save stream for the shared image and copies the
content in AStream to the save stream. The ReadStream method is
called to load the image data for the class instance.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
