Products | Support | Send comments on this topic. | Email a link to this topic. | Back to Getting Started | Help Version 18.0.10.23
LEADTOOLS Common Dialog C DLL Help

RESIZEDLGPARAMS

Show in webframe

typedef struct _RESIZEDLGPARAMS
{
   L_UINT uStructSize;
   pBITMAPHANDLE pBitmap;
   L_UINT uMaxNewWidth ;
   L_UINT uMaxNewHeight ;
   L_UINT uMaxNewResolutionX ;
   L_UINT uMaxNewResolutionY ;
   L_UINT uNewWidth ;
   L_UINT uNewHeight ;
   L_UINT uNewResolutionX ;
   L_UINT uNewResolutionY ;
   L_UINT uOriginalWidth ;
   L_UINT uOriginalHeight ;
   L_UINT uOriginalResolutionX ;
   L_UINT uOriginalResolutionY ;
   L_UINT uOriginalBitsPerPixel ;
   L_UINT uResize;
   L_UINT32 uDlgFlags;
   LTCOMMDLGHELPCB pfnHelpCallback;
   L_VOID *pHelpCallBackUserData;
} RESIZEDLGPARAMS,* LPRESIZEDLGPARAMS;

The RESIZEDLGPARAMS structure provides information used to initialize the dialog box created by the L_DlgResize 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

Pointer to the bitmap handle that references the bitmap for processing. If you specify DLG_RESIZE_AUTOPROCESS in the uDlgFlags parameter this must point to a valid bitmap handle. Otherwise, you can pass NULL in this parameter.

uMaxNewWidth

Value that represents the maximum width for the resized bitmap that can be set by the dialog user. This value ranges from 1 to 100000. If you set this field to 0 the dialog will set the maximum allowed value to the default of 30000.

uMaxNewHeight

Value that represents the maximum height for the resized bitmap that can be set by the dialog user. This value ranges from 1 to 100000. If you set this field to 0 the dialog will set the maximum allowed value to the default of 30000.

uMaxNewResolutionX

Value that represents the maximum X resolution that can be set by the user. This value ranges from 1 to 30000. If you set this field to 0 the dialog will set the maximum allowed value to the default of 10000.

uMaxNewResolutionY

Value that represents the maximum Y resolution that can be set by the user. This value ranges from 1 to 30000. If you set this field to 0 the dialog will set the maximum allowed value to the default of 10000.

uNewWidth

A variable to be updated with the width entered in the dialog. Set this variable to set the initial value for the dialog. The value set must not exceed the maximum set in the uMaxNewWidth field. In addition, if you set DLG_RESIZE_MAINTAINASPECT in uDlgFlags you must be sure that uNewWidth and uNewHeight have the same aspect ratio as uOriginalWidth and uOriginalHeight. Otherwise both uNewWidth and uNewHeight values will be replaced with the uOriginalWidth and uOriginalHeight respectively. If you set this field to 0 the dialog's initial width value will equal the value of the uOriginalWidth field.

uNewHeight

A variable to be updated with the height entered in the dialog. Set this variable to set the initial value for the dialog. The value set must not exceed the maximum set in the uMaxNewHeight field. In addition, if you set DLG_RESIZE_MAINTAINASPECT in uDlgFlags you must be sure that uNewWidth and uNewHeight have the same aspect ratio as uOriginalWidth and uOriginalHeight. Otherwise both uNewWidth and uNewHeight values will be replaced with the uOriginalWidth and uOriginalHeight respectively. If you set this member to 0 the dialog's initial height value will equal the value of the uOriginalHeight field.

uNewResolutionX

A variable to be updated with the horizontal resolution entered in the dialog. The value set must not exceed the value set in the uMaxNewResolutionX field. The value set in this field will not affect the initial width and height set in the uNewWidth and uNewHeight fields. Setting this field to 0 will set the initial horizontal value in the dialog to the value of the uOriginalResolutionX field.

uNewResolutionY

A variable to be updated with the vertical resolution entered in the dialog. The value set must not exceed the value set in the uMaxNewResolutionY field. The value set in this field will not affect the initial width and height set in the uNewWidth and uNewHeight fields. Setting this field to 0 will set the initial vertical value in the dialog to the value of the uOriginalResolutionY field.

uOriginalWidth

A variable to be filled with the original width(usually the bitmap width). The value must not be less than 1. uOriginalWidth will be used through the dialog to calculate the width percentage and the aspect ratio. The value set in this field will be displayed in the Original Image Width static control. Notice that setting the bitmap will not compensate for not setting the appropriate value in this field.

uOriginalHeight

A variable to be filled with the original height(usually the bitmap height). The value must not be less than 1. uOriginalHeight will be used through the dialog to calculate the height percentage and the aspect ratio. The value set in this field will be displayed in the Original Image Height static control. Notice that setting the bitmap will not compensate for not setting the appropriate value in this field.

uOriginalResolutionX

A variable to be filled with the original horizontal resolution (usually the bitmap horizontal resolution). The value set in this field will be displayed in the Resolution Horizontal static control. Notice that setting the bitmap will not compensate for not setting the appropriate value in this field.

uOriginalResolutionY

A variable to be filled with the original vertical resolution (usually the bitmap vertical resolution). The value set in this field will be displayed in the Resolution Vertical static control. Notice that setting the bitmap will not compensate for not setting the appropriate value in this field.

uOriginalBitsPerPixel

A variable to be filled with the original bits per pixel (usually the bitmap bits per pixel). The value set in this field will be used to calculate the size displayed in the Original Image Size static control and the New Image Size static control. Notice that setting the bitmap will not compensate for not setting the appropriate value in this field.

uResize

Flag that indicates the resize method entered in the dialog. Set this to indicate the initial value for the dialog. Possible values:

 

Value

Meaning

 

SIZE_NORMAL

[0x0000] Resize normally.

 

SIZE_FAVORBLACK

[0x0001] Document/Medical only) Preserve black objects when making the image smaller. This option affects only 1-bit, black-and-white images, where it prevents the disappearance of thin lines. You can use a bitwise OR ( | ) to combine this flag with another one. For example, SIZE_RESAMPLE | SIZE_FAVORBLACK causes color images to be resampled, but applies the favor-black option to 1-bit, black-and-white images.

 

SIZE_RESAMPLE

[0x0002] Use linear interpolation and averaging to produce a higher-quality image.

 

SIZE_BICUBIC

[0x0004] Use bicubic interpolation and averaging to produce a higher quality image. This is slower than SIZE_RESAMPLE.

 

uDlgFlags

User interface flags for this dialog, which determine the layout and action of the dialog. Possible values are:

 

Value

Meaning

 

DLG_RESIZE_AUTOPROCESS

[0x00000001] process the image on OK. The pBitmap member of this structure should contain a valid bitmap.

 

DLG_RESIZE_SHOW_CONTEXTHELP

[0x00000002] dialog should contain a context sensitive help icon.

 

DLG_RESIZE_SHOW_PERCENTAGE

[0x00000004] dialog should contain the percentage value combo

 

DLG_RESIZE_SHOW_MAINTAINASPECT

[0x00000008] dialog should contain the maintain aspect check box

 

DLG_RESIZE_SHOW_RESOLUTION

[0x00000010] dialog should contain the resolution group information.

 

DLG_RESIZE_SHOW_IDENTICALVALUE

[0x00000020] dialog should contain the identical value check box. This option requires DLG_RESIZE_SHOW_RESOLUTION to be set.

 

DLG_RESIZE_MAINTAINASPECT

[0x00000040] dialog will maintain the aspect ratio for the specified nNewWidth and nNewHeight values.

pfnHelpCallback

Pointer to an optional help callback function. If you do not wish to provide help to this dialog, use NULL as the value of this parameter. To provide help to this dialog, use the function pointer as the value of this parameter. The callback function must adhere to the prototype described in LTCOMMDLGHELPCB.

pHelpCallBackUserData

Void pointer that you can use to pass one or more additional parameters that the callback function needs. To use this feature, assign a value to a variable or create a structure that contains as many fields as you need. Then, in this parameter, pass the address of the variable or structure, casting it to L_VOID *. The callback function, which receives the address in its own pHelpCallBackUserData parameter, can cast it to a pointer of the appropriate data type to access your variable or structure. If the additional parameters are not needed, you can pass NULL in this parameter.

Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.