### QPxObs_GetPictureThumbnail

QPxObs_GetPictureThumbnail(pictVar; thumbPict; thumbWidth; thumbHeight; pixelDepth; fill):error
| pictVar | Picture | Picture variable
| thumbPict | Picture | The thumbnail picture
| thumbWidth | Longint | The thumbnail's width
| thumbHeight | Longint | The thumbnail's height
| pixelDepth | Longint | The thumbnail's pixel depth
| fill | Longint | The thumbnail's fill color
| error | Longint | Error result

### Do not use this command in QPix v3 or later

This command is preserved in QPix v3 for backward compatibility reasons. In v3 it is substituted by QPx_CreatePictureThumbnail which creates high-quality thumbnails.

Creates a thumbnail from a 4D picture variable.

The source picture is passed in the pictVar parameter.

The thumbnail is returned in the thumbPict picture variable. Thumbnail dimensions are specified by thumbWidth and thumbHeight. These need not be proportional to the original image dimensions; QPix will automatically scale down the picture proportionally and center it inside the designated rectangle. This command cannot be used for scaling pictures up; the command QPx_ResizePicture should be used to do this.

Thumbnail pixel depth is specified in the pixelDepth parameter. The pixelDepth parameter must be in range of 0..40 (values greater than 32 mean grayscale). If omitted or equal to 0, QPix will use the original pixel depth instead.

The color used to fill the areas of the thumbnail that will remain uncovered, is specified in the fill parameter. If omitted or equal to 0, QPix will use the black color. fill color should be specified in the same way as in 4D's SET RGB COLOR command: 0x00RRGGBB.

Alternatively to RGB you can use 4D's automatic colors. Also, you can get a "tight" thubnail as explained below. See thumb options for the full list of all available constants and corresponding values.

"Tight" thumbnails

If you specify the value -256 (or the constant qpx_NoFill) in the fill parameter, QPix will function somewhat differently: instead of producing a thumbnail that fits exactly the designated size and fill the uncovered area with the designated fill color, it will produce a thumbnail that will contain only the useful part of the image. This is what we call a "tight" thumbnail. Tight thumbnails normally occupy less bytes than color-filled ones. Also, their actual width and height is not identical to the width and height of the requested container rectangle. To get the actual dimensions of a tight thumbnail, use QPx_GetPictureInfo.

Example

``Create a 80x80, 256 color thumbnail` ``Fill uncovered area with the default background color` `` `C_LONGINT($error)` `C_PICTURE($picture)` `C_PICTURE($thumbnail)` `` `$picture:=[Images]Picture` `` `$error:=QPx_GetPictureThumbnail ($picture;$thumbnail; 80; 80; 8;Default background color)` `` `If ($error#qpx_noErr)` ``Handle the error` `End if`

QPix © Escape
Generated by QDoc 2.8 on Wed, Feb 17, 2010 17:47:08