PICTools Programmer's Reference
ZOOM_PARMS

ZOOM_PARMS: OP_ZOOM

The ZOOM_PARMS structure contains the parameters for the OP_ZOOM opcode used for changing the dimensions of a DIB, converting a DIB to gray scale or converting a DIB to halftone. The ZOOM_PARMS structure is used as follows.

 
Copy Code
typedef struct {
   DWORD                   Reserved0;
   BYTE PICHUGE*           Reserved1;
   BYTE PICHUGE*           Reserved2;
   BYTE PICHUGE*           Reserved3;
   BYTE PICHUGE*           Reserved4;
   BYTE PICHUGE*           Reserved5;
   BYTE PICHUGE*           Reserved6;
   BYTE PICHUGE*           Reserved7;
   BYTE PICHUGE*           Reserved8;
   PICFLAGS                PicFlags;
   PICFLAGS                PicFlags2;
   LONG                    NewWidth;
   LONG                    NewHeight;
   WORD                    Mode;
   WORD                    NewBitCount;
   void PICFAR*            WorkArea;
   BITMAPINFOHEADER        BiOut;
   DWORD                   Reserved;
   REGION                  RegionOut;
} ZOOM_PARMS;

Fields:

Name Description

Reserved0

Reserved1

Reserved2

Reserved3

Reserved4

Reserved5

Reserved6

Reserved7

Reserved8

These fields are not currently used and must be set to 0.

PicFlags

Flags that control the zoom operation.

Value

Meaning

PF_ConvertGray

If PF_ConvertGray is set, then the image is converted to gray scale.  If PF_ConvertGray is clear, then the output image is a 24-bit DIB, even if the input image were gray scale.

PF_YieldPut

Set if the RES_PUT_DATA_YIELD response is desired.

PicFlags2

This field is not currently used and must be set to 0.

NewWidth

NewHeight

Mode

If Mode is 0, then the new image will have a width of NewWidth pixels and a height of NewHeight lines.  If Mode is not 0, then NewWidth and NewHeight are interpreted as specifying a scale factor.  The width of the new image will be the rounded value of NewWidth / NewHeight times the width of the original image.  The height of the new image will be the rounded value of NewWidth / NewHeight times the height of the original image.  Both NewWidth and NewHeight must be greater than 0 and less than 65536.

If Mode is not 0, then the new image width and height are returned by Pegasus in NewWidth and NewHeight, as well as being returned in BiOut.biWidth and BiOut.biHeight.

NewBitCount

If NewBitCount is 1, then the image is converted to halftone.  If NewBitCount is 0, then the output image bits per pixel is determined by the PF_ConvertGray flag in PicFlags.  If it is set then the output image bit count will be 8, otherwise it will be 24.  If NewBitCount is not 0 or 1, then it must be 8 if PF_ConvertGray is set or 24 if PF_ConvertGray is clear.

WorkArea

This is reserved.

BiOut

When Pegasus initialization is complete (RES_DONE after REQ_INIT), then BiOut contains the BITMAPINFOHEADER for the new image.

Reserved

This field is not currently used and must be set to 0.

RegionOut

This field is not used for OP_ZOOM.

 

 


©2022. Accusoft Corporation. All Rights Reserved.

Send Feedback