ImageEn, unit iexBitmaps

TIEBitmap.SaveRAWToBufferOrStream

TIEBitmap.SaveRAWToBufferOrStream


Declaration

function SaveRAWToBufferOrStream(Buffer: pointer; Stream: TStream; StreamHasSize: boolean = true): Int64;


Description

Saves the image using an internal format which preserves the pixel format and alpha channel.
Location field will be lost. Only the image and its description is saved.
If the image has an alpha channel, it is also saved.
Returns the size of the stream.

You can save the image inside a buffer or a stream.
 When saving to a buffer you must specify a valid Buffer (of size returned by CalcRAWSize) and Stream must be nil
 When saving to a Stream the Buffer parameter must be nil

Set StreamHasSize = true if specified Stream can set Size of stream.


See Also

 LoadRAWFromBufferOrStream
 CalcRAWSize