Visit Gigasoft's Web Site
 ProEssentials v9 Help

PEcopypngtohglobal

DWORD  PEcopypngtohglobal(hObject, lpPoint, lphGlobal, hDC);

 

HWND 

hObject

The handle returned from PEcreate.

POINT* 

lpPoint

Pointer to POINT struct holding size.

HGLOBAL* 

lphGlobal

Handle to destination global object.

INT 

hDC

Handle to a target device context. If zero, a screen compatible DC is targeted.

 

This function stores a PNG into a global memory object and returns the size of the object.  This can be used within low-level server control logic to stream PNG content to a browser, or just get the bits for a PNG image.

 

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.

 

Returns

The amount of binary data stored.

 

Comments

This function is used internally to enable the .NET and ActiveX server controls to stream PNG states to the browser.

 

The hDC argument was added in v6 to aid in preparing a PNG to be sent to a printer via GdiPlus DrawImage call. Supplying the printer's target hDC helps create the high resolution PNG necessary for printing purposes.

 

See Also: PEserializetohglobal, PEcopyjpegtohglobal, PeFunction.Image.PngToStream