Visit Gigasoft's Web Site
 ProEssentials v9 Help

PEcopypngtofile

BOOL PEcopypngtofile (hObject, lpPoint, lpszFilename)

 

HWND 

hObject

The handle returned from PEcreate.

POINT* 

lpPoint

Pointer to POINT struct holding size.

WCHAR* 

lpszFilename

Pointer to null-terminated string.

 

This function places the current image, in the form of a png, into a file named by lpszFilename.

 

Parameter

Description

lpPoint

Pointer to a POINT struct where POINT.x stores the number of pixels wide and POINT.y stores the number of pixels high. The dimensions must be between 32 and 2000 pixels. To insure image quality, the aspect ratio (width/height) must be between 0.333 and 10.0.

lpszFilename

This pointer must identify a valid filename.

 

Returns

NonZero if the function was successful, otherwise Zero.

 

Comments

.NET developers, see PeFunction.Image.PngToFile

 

Ocx|Vcl developers, see the PEactions property. OCX developers also see PEcopypngtofile method.

 

Using the OCX interface, you can call this function as follows

bResult = Pego1.PEcopypngtofile(nXPixels, nYPixels, strFilename)

or

Pego1.PEnarg1 = 'width in pixels

Pego1.PEnarg2 = 'height in pixels

Pego1.PEstrarg1 = 'filename

Pego1.PEactions = COPY_PNG_TO_FILE ' Calls PEcopypngtofile

 

In Delphi, use...

PEGraph1.PEnarg1 := {width in pixels};

PEGraph1.PEnarg2 := {height in pixels};

PEGraph1.PEstrarg1 := {filename};

PEGraph1.PEactions := gPngToFile; {Calls PEcopypngtofile}

 

See Also: PngIsInterlaced, PngIsTransparent, PngTransparentColor, PEcopypngtoclipboard, OCX-PEcopypngtofile.