[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
Saves image data to the specified stream.
Source position: graphics.pp line 1312
public procedure TRasterImage.SaveToStream( |
AStream: TStream |
); override; |
AStream |
|
Stream where the image data is stored. |
SaveToStream is an overridden method used to write image data to the stream specified in AStream.
SaveToStream calls SaveStreamNeeded to ensure that an internal save stream exists in the class instance. An EInvalidGraphicOperation exception is raised in SaveStreamNeeded when the active update count for the count is not 0 (zero). An FPImageException is raised when a TMemoryStream instance could not be created and initialized in SaveStreamNeeded.
SaveToStream resets the internal save to stream to its origin, and resizes AStream to include sufficient storage for the values in the internal save stream. The CopyFrom method in AStream is called to store the content for the internal shared image. An FPImageException is raised when the number of bytes written in the CopyFrom method does not match the size for the internal save stream.
Raises an FPImageException exception when the number of bytes written to the stream does not match the size for the raw image data.
An Exception may be raised in SaveToStream (called in the method).
|
SaveToStream - write graphic data to a stream. |
Version 4.0 | Generated 2025-05-03 | Home |