OnSaveFile

Parent Previous Next

Property OnSaveFile: TSaveFileEvent

TSaveFileEvent = procedure(Sender : TObject; Bitmap : TBitmap;  AFileName : string; var Handled : Boolean) of object;

Write an OnSaveFile event handler to handle file formats not supported by ImagePainter.

Sender is an ImagePainter component. Bitmap is the bitmap representation of the foreign format. AFileName is the image filename. Set Handled to true if the format is actually handled.

ImagePainter relies on the file extension to decide what kind of graphics to save.  If the extension is not BMP, JPG/JPEG, PNG *, GIF * or ICO (or IPD for document files) the OnSaveFile event handler fires. The application writer may then save the graphics himself by converting the bitmap representation back to the original format.

See also
OnLoadFile event

* Only Delphi 2009 and later