.. highlightlang:: us .. index:: ImageCreate .. _imagecreate: ImageCreate =========== .. us.tag ImageCreate NOTREADYENGLISH Image New360 Changed400 Changed427 Changed532 Changed6000 :ref:`ImageCreate` creates a picture object. .. function:: hImg = ImageCreate(ssFileName) hImg = ImageCreate(hImgOther) hImg = ImageCreate(width, height) .. us.return **Return Value** *hImg* is the handle of the new picture object. .. us.params **Parameters** .. uparam:: hImgOther If *hImgOther* is given the function creates a copy of *hImgOther*. .. uparam:: ssFileName *ssFileName* is the name of a picture file. The following types are supported: .. list-table:: :header-rows: 1 * - 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. .. uparam:: width Is the *width* in pixel. .. uparam:: height Is the *height* in pixel. .. us.example **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); .. us.history **History** .. list-table:: :header-rows: 1 * - Version - Description * - 5.3.2 - *width* and *height* parameters * - 4.2.7 - Function can be invoked with one parameter *hImgOther* (copy constructor). .. seealso:: :ref:`overview-pictures`, :ref:`ImageUpdate`, :ref:`ObjCopy` :sub:`id-1488459`