Supported Browsers Home   
MGL_saveBitmapFromDC Previous   
MGL_savePCXFromDC Next   
External Functions Up   

MGL_saveJPEGFromDC

Save a portion of a device context to JPEG on disk.

Declaration

ibool MGLAPI MGL_saveJPEGFromDC(
    MGLDC *dc,
    const char *JPEGName,
    int left,
    int top,
    int right,
    int bottom,
    int quality)

Prototype In

mgraph.h

Parameters

dc

Device context to save

JPEGName

Name of bitmap file to save

left

Left coordinate of bitmap to save

top

Top coordinate of bitmap to save

right

Right coordinate of bitmap to save

bottom

Bottom coordinate of bitmap to save

quality

Quality factor for compression (1-100)

 

Return Value

True on success, false on error.

Description

This function saves a portion of a device context as a JPEG format bitmap file to disk. If this function fails for some reason, it will return false and you can get the error code from the MGL_result function.

Note that the source rectangle for the bitmap to be saved is not clipped to the current clipping rectangle for the device context, but it is mapped to the current viewport. If you specify dimensions that are larger than the current device context, you will get garbage in the bitmap file as a result.

Note that MGL currently only supports saving bitmap data to JPEG files from 8 bits per pixel device contexts.

See Also

MGL_LoadJPEG,MGL_loadJPEGIntoDC

Copyright © 2002 SciTech Software, Inc. Visit our web site at http://www.scitechsoft.com