L_SetLoadResolution

#include "l_bitmap.h"

L_LTFIL_API L_INT L_SetLoadResolution(nFormat, nWidth, nHeight)

L_INT nFormat;

/* file format */

L_UINT nWidth;

/* width of the bitmap to load */

L_UINT nHeight;

/* height of the bitmap to load */

Specifies the physical resolution (width and height) of the FlashPix, PhotoCD, or JBIG file to load.

Parameter

Description

nFormat

File format. The following are possible values:

 

Value

Meaning

 

FILE_PCD

[57] Kodak PhotoCD

 

FILE_FPX

[80] Kodak FlashPix

 

FILE_JBIG

[115] JBIG

 

FILE_JP2

[163] JPEG 2000. This file format contains image data and extra information about the contents and organization of the file.

 

FILE_J2K

[164] JPEG 2000. This file format contains only a stream of image data.

 

FILE_CMW

[165] Wavelet CMP.

 

FILE_ECW

[277] Enhanced Compressed Wavelet.

nWidth

Width of the bitmap to load. You can pass 0 to get the default.

nHeight

Height of the bitmap to load. You can pass 0 to get the default.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

For PhotoCD files, you can do either of the following:

image\sqrblit.gif Specify one of the exact sets of dimensions in the file. You can determine the available dimensions using the L_ReadLoadResolutions function.

image\sqrblit.gif Specify 0 for both dimensions to load the default resolution.

For FlashPix files, you can do any of the following:

image\sqrblit.gif Specify one of the exact sets of dimensions in the file. You can determine the available dimensions using the L_ReadLoadResolutions function.

image\sqrblit.gif Specify either the desired width or desired height to load, and use 0 to get the default for the other dimension. The default preserves the aspect ratio. The load procedure resizes the bitmap while loading it if necessary.

image\sqrblit.gif Specify 0 for both dimensions to load the default resolution.

For JBIG files, you can do any of the following:

image\sqrblit.gif Specify 0 for both dimensions to load the default resolution, which is the highest resolution layer, which corresponds to the image with its FULL DIMENSIONS.
Ex: If the file contains the image at the following dimensions: 800X600, 400X 300 and 200X150, then in the default case the filter will load the image at 800X600.

image\sqrblit.gif Specify either the desired width or desired height to load, and use 0 to get the default for the other dimension. The load procedure will determine the closest resolution layer, which best fits the user's request.
Ex: If the file contains the image at the following dimensions: 800X600, 400X 300 and 200X150 and the user requests an image with width equal to 780 for example, then LEADTOOLS will automatically know that the proper width is 800 and load the image at the (800X600) resolution.

image\sqrblit.gif Specify one of the exact sets of dimensions in the file. You can determine the available dimensions using the L_ReadLoadResolutions function.

For ECW files, you can do any of the following:

image\sqrblit.gif Specify 0 for both dimensions to load the default resolution.

image\sqrblit.gif You can determine the max width/height that can be set by using L_ReadLoadResolutions function.

image\sqrblit.gif You cannot set width/height larger than max values returned by L_ReadLoadResolutions function

 

Required DLLs and Libraries

LTFIL
File format DLLs

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Platforms

Windows 2000 / XP/Vista, Windows CE.

See Also

Functions:

L_ReadLoadResolutions, L_GetLoadResolution, L_2DGetViewMode L_2dGetViewPort, L_2DSetViewMode, L_2DSetViewPort

Topics:

Raster Image Functions: Loading Files

 

Raster Image Functions: Getting and Setting File Information

 

Implementing PhotoCD and FlashPix Features

 

Implementing JBIG Features

Example

For an example, refer to L_ReadLoadResolutions.