Declaration
property StreamHeaders: boolean;
Description
If True, each SaveToStreamXXX method adds an additional special header as needed for multi-image streams.
When a special header is added, the images saved with SaveToStream*** aren't compatible with LoadFromFile*** methods.
// Save ImageEnView1 and ImageEnView2 images in the file, images.dat
// Note: images.dat won't be loadable with LoadFromFileXXX methods
var
fs: TFileStream;
Begin
fs := TFileStream.Create('bmpimages.dat', fmCreate);
ImageEnView1.IO.StreamHeaders := True;
ImageEnView1.IO.SaveToStreamJPEG(fs);
ImageEnView2.IO.StreamHeaders := True;
ImageEnView2.IO.SaveToStreamJPEG(fs);
fs.free;
End;
// Save a single image in image.jpg
// image.jpg is loadable with LoadFromFileXXX methods
var
fs: TFileStream;
Begin
fs := TFileStream.Create('image.jpg');
ImageEnView1.IO.StreamHeaders := False;
ImageEnView1.IO.SaveToFileJPEG(fs);
End;