PNGWEBTUNERDLGPARAMS
typedef struct _PNGWEBTUNERDLGPARAMS
{
L_UINT uStructSize;
pBITMAPHANDLE pBitmap;
L_BOOL bZoomToFit;
COLORREF crTransparent;
L_INT nPalType ;
L_BOOL bAddWindowsColors ;
L_INT nDitherType ;
L_INT nBitsPerPixel ;
L_INT nNumOfColors ;
L_INT nTransparencyTolerance ;
L_BOOL bTransparent ;
L_UINT32 uDlgFlags ;
LTCOMMDLGHELPCB pfnHelpCallback ;
L_VOID *pHelpCallBackUserData ;
} PNGWEBTUNERDLGPARAMS, * LPPNGWEBTUNERDLGPARAMS ;
The PNGWEBTUNERDLGPARAMS structure provides information used to initialize the dialog box created by the LDialogWeb::DoModalPNGWebTuner function. After the user closes the dialog box, this structure is updated with information about the user's selections.
Member |
Description |
|
uStructSize |
Size of this structure, in bytes. Use the sizeof operator to calculate this value. |
|
pBitmap |
Ignored. |
|
bZoomToFit |
Flag that indicates the initial zoom level for previewing the image. Possible values are: |
|
|
Value |
Meaning |
|
TRUE |
Set the initial zoom level to "Zoom to fit". |
|
FALSE |
Set the initial zoom level to "Normal (1:1)". |
crTransparent |
The color that will be transparent in the PNG image. This color is in RGB. |
nPalType |
Value that indicates the type of palette to use. Possible values are: |
|
|
Value |
Meaning |
|
CRF_FIXEDPALETTE |
Use the fixed palette. |
|
CRF_OPTIMIZEDPALETTE |
Create an optimized palette. |
bAddWindowsColors |
Flag that indicates whether to use the identity palette. Possible values are: |
|
|
Value |
Meaning |
|
TRUE |
Use the identity palette. |
|
FALSE |
Do not use the identity palette. |
nDitherType |
Flag that indicates the dithering type to use. Possible values are: |
|
|
Value |
Meaning |
|
CRF_NODITHERING |
Use nearest color matching |
|
CRF_FLOYDSTEINDITHERING |
Use Floyd-Steinberg dithering |
|
CRF_STUCKIDITHERING |
Use Stucki dithering |
|
CRF_BURKESDITHERING |
Use Burkes dithering |
|
CRF_SIERRADITHERING |
Use Sierra dithering |
|
CRF_STEVENSONARCEDITHERING |
Use Stevenson Arce dithering |
|
CRF_JARVISDITHERING |
Use Jarvis dithering |
|
CRF_ORDEREDDITHERING |
Use ordered dithering, which is faster but less accurate than other dithering methods. |
|
CRF_CLUSTEREDDITHERING |
Use clustered dithering |
nBitsPerPixel |
The bits per pixel for the tuned bitmap. Valid values are: 1, 4, 8, 24, and 32 bpp. |
|
nNumOfColors |
When nBitsPerPixel is 8 or less (the image is using indexed colors), this value represents the maximum number of colors that the PNG image can have. Possible values range from 2 to 256. Indexed PNG images can have from 2 colors to 256 colors. Using fewer colors results in smaller files, but also reduces the quality of the image. |
|
nTransparencyTolerance |
A tolerance value that determines how close a pixel's RGB value should be to the specified transparent color to be considered transparent. A tolerance of 0 means only the transparent color specified in crTransparent will be considered transparent. Specifying larger numbers will make more of the image transparent. Valid values are from 0 to 255. |
bTransparent |
Flag that indicates whether the PNG image will have a transparent color. Possible values are: |
|
|
Value |
Meaning |
|
TRUE |
The PNG image will have a transparent color. |
|
FALSE |
The PNG image will not have a transparent color. |
|
Note: not all web browsers are capable of presenting transparency for PNG images (especially for 24-bit PNG images). |
|
uDlgFlags |
User interface flags for this dialog which determines the layout and action of the dialog. This dialog doesn’t support the Auto-Process feature; however it makes up for that by allowing the user to export tuned images directly from the dialog. This is done by setting the DIALOG_PNGWEBTUNER_SHOW_EXPORT flag. Possible values are: |
|
|
Value |
Meaning |
|
DLG_PNGWEBTUNER_SHOW_CONTEXTHELP |
[0x00000001] Dialog should contain a context sensitive help icon. |
|
DLG_PNGWEBTUNER_SHOW_TOOL_COLORPICKER |
[0x00000008] Show the color button in the toolbar. |
|
DLG_PNGWEBTUNER_SHOW_INFORMATION |
[0x00000010] Show the Information group of controls. |
|
DLG_PNGWEBTUNER_SHOW_ADDWINDOWCOLOR |
[0x00000020] Show the Add Window Colors check box. |
|
DLG_PNGWEBTUNER_SHOW_TRANSPARENCY |
[0x00000040] Show the Transparency group of controls. |
|
DLG_PNGWEBTUNER_SHOW_EXPORT |
[0x00000080] Show the Export button instead of the OK button. |
|
DLG_PNGWEBTUNER_SHOW_APPLY |
[0x00000100] Show the Apply button in the dialog. The dialog will not apply any effect unless the user presses the Apply button. |
pfnHelpCallback |
Ignored. |
|
pHelpCallBackUserData |
Ignored. |