| ImageEn, unit iexHelperFunctions |
|
IEGenerateSampleImage
IEGenerateSampleImage
Declaration
procedure IEGenerateSampleImage(Dest: TIEBitmap: PixelFormat: TIEPixelFormat; Width, Height: Integer); overload;
function IEGenerateSampleImage(PixelFormat: TIEPixelFormat; Width, Height: Integer): TIEBitmap; overload;
procedure IEGenerateSampleImage(Dest: TIEBitmap; PixelFormat: TIEPixelFormat;; Width, Height: Integer; WantAlpha: Boolean); overload;
function IEGenerateSampleImage(PixelFormat: TIEPixelFormat;; Width, Height: Integer; WantAlpha: Boolean): TIEBitmap; overload;
Description
Generate a sample image of any pixel format suitable for testing.
| Parameter | Description |
| PixelFormat | The pixel format of the image (any value is supported except ieNull) |
| Width, Height | The size to create the sample image |
| WantAlpha | Enable to specifically include or exclude an alpha channel (transparency). with the non-alpha overloads, the alpha channel is only included with the ie32RGB format |
Note:
◼For ie32RGB format, the
AlphaLocation will be iaRGBA
◼You must add the iexHelperFunctions unit to your uses clause
◼TImageEnView cannot display the following
pixel formats if the
bitmap location is ieTBitmap: ie32f, ieCMYK, ieCIELab, ie48RGB
◼If attached to a
TImageEnView, it will automatically call
Update
Demos
| Demos\ImageEditing\EveryMethod\EveryMethod.dpr |
Examples
// Create an 8 bit paletted image
bmp := IEGenerateSampleImage( ie8p, 600, 400 );
ImageEnView1.Assign( bmp );
bmp.Free()

// Display a 48 bit image with an alpha channel in a TImageEnView
ImageEnView1.IEBitmap.Location := ieFile; // Location must not be ieTBitmap for some native pixel formats
IEGenerateSampleImage( ImageEnView1.IEBitmap, ie48RGB, 600, 400, True );