You are reading help file online using chmlib.com
|
Rave Reports Developer Reference TBaseReport. OnDecodeImage event (read/write/published) |
Top Previous Next |
Declaration procedure OnDecodeImage( Sender: TObject); ImageStream: TStream; ImageType: String; Bitmap: TBitmap );
Category Graphics HTML PDF RTF
Description This event is called when Rave needs to convert image data (created from the PrinitImageRect method) to a bitmap for printing. This would normally appear on a TRvRenderPrinter or TRvRenderPreview component, but could also be defined in a TRvSystem component.
See also TBaseReport Class, PrintImageRect
Example (Delphi) var Image: TJPEGImage; Format: word; Data: THandle; Palette: HPalette; if ImageType = 'JPG' then begin Image := TJPEGImage.Create; // Create a TJPEGImage class Image.LoadFromStream(ImageStream); // Load JPEG image from ImageStream Image.DIBNeeded; // Convert JPEG to bitmap format // Save JPEG to clipboard in bitmap format Image.SaveToClipboardFormat(Format,Data,Palette); Image.Free; // Free the image // Load bitmap from clipboard Bitmap.LoadFromClipboardFormat(Format,Data,Palette); end; { if}
Example (C++Builder) if (ImageType == "JPG") { Image = new TJPEGImage(); // Create a JPEGImage class Image->LoadFromStream(ImageStream); // Load JPEG image from ImageStream Image->DIBNeeded(); // Convert JPEG to bitmap format // Save JPEG to clipboard in bitmap format Image->SaveToClipboardFormat(Format,Data,Palette); delete Image; // Free the image // Load bitmap from clipboard Bitmap->LoadFromClipboardFormat(Format,Data,Palette); } // if |
You are reading help file online using chmlib.com
|