ImageEn, unit iexBitmaps

TIEBitmap.Create

TIEBitmap.Create


Declaration


constructor Create();
constructor Create(ImageWidth, ImageHeight: integer; ImagePixelFormat: TIEPixelFormat = ie24RGB);
constructor Create(const FileName: string; IOParams: TIOParams = nil);
constructor Create(image: TIEBitmap);
constructor Create(image: TIEBitmap; Rect: TRect); overload;
constructor Create(image: TBitmap); overload;
constructor Create(image: TBitmap; Rect: TRect); overload;
constructor Create(Buffer: pointer; BufferSize: integer; Format: TIOFileType = ioUnknown); overload;


Description


Creates a new TIEBitmap object.
The second overload creates the bitmap using specified parameters.
Third overload loads image from specified file. IOParams specifies the in/out parameters as TIOParams objects.
Fourth overload creates a clone of source image.
Fifth overload creates from memory buffer.

Note: All pixels for the new bitmap will be 0 (i.e. black).


Examples


// creates an empty image
bmp1 := TIEBitmap.Create();

// creates 1000x1000, 24 bit RGB image
bmp2 := TIEBitmap.Create(1000, 1000, ie24RGB);
bmp2.Fill( clWhite );

// creates an image from file "input.png"
bmp2 := TIEBitmap.Create('input.png');

// creates a clone of bmp2
bmp3 := TIEBitmap.Create(bmp2);