The THUMBOPTIONS structure provides the thumbnail creation options.
typedef struct _THUMBOPTIONS
L_INT nWidth; /* thumbnail width */
L_INT nHeight; /* thumbnail height */
L_INT nBits; /* thumbnail bits per pixel */
L_UINT uCRFlags; /* color resolution flags */
L_BOOL bMaintainAspect; /* aspect ratio flag */
L_BOOL bForceSize; /* force size flag */
L_COLORREF crBackColor; /* background color */
L_BOOL bLoadStamp; /* load stamp flag */
L_BOOL bResample; /* resample flag */
} THUMBOPTIONS, * pTHUMBOPTIONS;
Size of this structure in bytes. Use the sizeof() operator to calculate this value.
Width of the thumbnail to create. This value is measured in pixels. The maximum value is 400. The minimum value is 16.
Height of the thumbnail to create. This value is measured in pixels. The maximum value is 400. The minimum value is 16.
Resulting bitmap pixel depth. The following are valid values:
|0||Default bits per pixel stored in the file|
|1 to 8||The specified bits per pixel in the resultant bitmap|
|12||12 bits per pixel in the resultant bitmap.|
|16||16 bits per pixel in the resultant bitmap|
|24||24 bits per pixel in the resultant bitmap|
|32||32 bits per pixel in the resultant bitmap|
|48||48 bits per pixel in the resultant bitmap|
|64||64 bits per pixel in the resultant bitmap|
Flags that will be passed to LBitmapBase::ColorRes internally when bForceSize is True, bMaintainAspect is True, and the source image is not 24-bit. In this case, the thumbnail image is converted to 24-bit, then, combined with a "background" bitmap. The resulting bitmap is then returned to the thumbnail image's original bit-depth using uCRFlags. For a list of possible values, refer to the uFlags parameter of LBitmapBase::ColorRes.
Flag that indicates whether the aspect ratio of the image should be maintained when creating the thumbnail. When set to TRUE, the generated thumbnail's width and height will not match both nThumbWidth and nThumbHeight if the original aspect ratio was not 1:1. If you desire the thumbnail be generated with exactly the requested width and height while still maintaining the aspect ratio of the actual image, set both bMaintainAspect and bForceSize to TRUE.
Flag that indicates whether the generated thumbnail should be forced to the requested size, even if bMaintainAspect is set to TRUE. If bForceSize is TRUE, the thumbnail bitmap will be generated by creating a "canvas" bitmap with the requested size, and then centering the actual image inside that bitmap. Note this is a slower process. This parameter is ignored if bMaintainAspect is FALSE.
Background color to use if both bForceSize and bMaintainAspect are TRUE.
Flag that indicates whether or not to attempt to load stamps from file formats that support preview images. Possible values are:
|TRUE||Attempt to load stamps.|
|FALSE||Do not attempt to load stamps.|
Flag that indicates whether or not to use interpolated resize when generating thumbnails. Possible values are:
|TRUE||Use interpolated resize.|
|FALSE||Do not use interpolated resize.|
If the bLoadStamp member of this structure is set to TRUE when LFile::CreateThumbnail is called and the file does not contain a stamp, then an error will be returned.
If 0 is specified for either nHeight or nWidth, the image will not be resized. The whole image will be returned in the LFile::BrowseDirCallBack function.
If -1 is specified for either the nHeight or nWidth, the image will not be loaded at all. The LFile::BrowseDirCallBack function will be called for each file, but will only receive file information, not a valid image.
Some functions which take this structure as a parameter require that the structure be initialized prior to the function call. You must set the uStructSize member to the total size, in bytes, of the structure. Use the sizeof() operator to calculate this value. Functions that do not require the structure be initialized will take the total size of the structure, in bytes, as an additional function parameter.
Medical Web Viewer .NET
.NET, Java, Android, and iOS/macOS Assemblies
C API/C++ Class Libraries