ImageCreateΒΆ
ImageCreate creates a picture object.
- hImg = ImageCreate(ssFileName)
- hImg = ImageCreate(hImgOther)
- hImg = ImageCreate(width, height)
Return Value
hImg is the handle of the new picture object.
Parameters
- hImgOther
If hImgOther is given the function creates a copy of hImgOther.
- ssFileName
ssFileName is the name of a picture file. The following types are supported:
Type
Meaning
GIF
Graphics Interchange Format.
PNG
Portable Network Graphics.
JPG
JPEG File Interchange-Format
BMP, BMZ
Bitmap and Bitmap compressed.
WMF, WMZ
Windows Meta File and Windows Meta File compressed.
EMF, EMZ
Enhanced Meta File and Enhanced Meta File compressed.
- width
Is the width in pixel.
- height
Is the height in pixel.
Example
hDoc = DocCreate();
hPage = PageCreate();
hLayer = LayerCreate();
DocAddPage(hDoc, hPage);
PageAddLayer(hPage, hLayer);
ssImage = "d:/c0005.jpg"
hImg = ImageCreate(ssImage);
if (hImg == 0) {
MessageBoxError("Image \"%s\" not found", ssImage);
return;
}
LayerAddObjects(hLayer, hImg);
ImageUpdate(hImg);
PageReplot(hPage);
History
Version |
Description |
---|---|
5.3.2 |
width and height parameters |
4.2.7 |
Function can be invoked with one parameter hImgOther (copy constructor). |
See also
id-1488459