PICTools Programmer's Reference
PEGQUERY

PEGQUERY: PegasusQuery

The PEGQUERY structure supplies parameters for the PegasusQuery function used to retrieve information about an image.

 
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                         NumOfPages;
   LONG                         PageNum;
   DWORD                        BitFlagsReq;
   DWORD                        BitFlagsAck;
   DWORD                        ImageSize;
   DWORD                        AuxSize;
   DWORD                        ImageNum;
   DWORD                        NumImages;
   DWORD                        SOIMarker;
   SUBSAMPLING                  SubSampling;
   REGION                       Region;
   BYTE                         LumFactor;
   BYTE                         ChromFactor;
   BYTE                         AllowedBitErr;
   BYTE                         TiffFirstByte;
   WORD                         ClusterHeaderVersion;
   WORD                         DjVuImageType;
   DWORD                        TIFFCompression;
   DWORD                        TIFFPhotometricInterpretation;
   DWORD                        TIFFIFDOffset;
   WORD                         PDFMajorVersion;
   WORD                         PDFMinorVersion;
   DWORD                        PixelDataOffset;
   DWORD                        PixelDataSize;
   BYTE                         TIFFOrientation;
   BYTE                         TIFFPredictor;
   BYTE                         TIFFFillOrder;
   BYTE                         TIFFT4Options;
   WORD                         NumPartitions;
   PICSIZET                     JpegOffset;
} PEGQUERY;

Fields:

Name Description

Reserved0

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

Reserved1

Reserved2

Reserved3

Reserved4

Reserved5

Reserved6

Reserved7

Reserved8

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

PicFlags

Value

Meaning

PF_IsProtected

Set by PegasusQuery if the input PIC2-format file requires a password. OP_D2W, OP_LIP3 (unless METHOD_JPEG and PF_JpegOnly are set), and OP_D2SE/OP_D2SEPLUS (if JpegType = JT_PIC2) create PIC2 files.

PF_IsTransparency

Set by PegasusQuery if the input GIF file has a transparent color.

PF_IsGray

Set by PegasusQuery if the input PNG image is grayscale.

PicFlags2

Value

Meaning

PF2_IsDCX

Set by PegasusQuery if the input image is a DCX-format file. Head.biCompression is set according to the PCX image in the file whose settings are being queried according to ImageNumber.

PF2_IsExif

Set by PegasusQuery if the input JPEG file is an EXIF file.

PF2_SpecialTIFF

Input to PegasusQuery if the input TIFF file requires special handling as a result of non-compliance with the TIFF specification.

PF2_3D_Slices

Set by PegasusQuery if the input JPEG 2000 file is comprised of 3D slices.

PF2_SkipJP2Header Set by PegasusQuery if the input JPEG2000 file contains only a JPEG2000 codestream (with no JP2/JPX header boxes).

NumOfPages

PageNum

Not used.

BitFlagsReq

Specifies which image information the application desires PegasusQuery to return. PegasusQuery returns TRUE if it is able to return all the information requested by BitFlagsReq, otherwise PegasusQuery returns FALSE. See BitFlagsAck for a description of the acceptable flags for this field.

BitFlagsAck

Specifies which image information was returned by PegasusQuery. If a flag is not set in BitFlagsAck, then the corresponding data should not be used. For example, if QBIT_BICLRUSED is not set, then the data in the Head.biClrUsed field in the PIC_PARM structure is not valid.

Flag

Corresponding PicParm Field

Meaning

QBIT_AUXSIZE

u.QRY.AuxSize

Size of the auxiliary information in the image such as comments

QBIT_BIBITCOUNT

Head.biBitCount

BITMAPINFOHEADER

QBIT_BICOMPRESSION

Head.biCompression

BITMAPINFOHEADER

QBIT_BICLRIMPORTANT

Head.biClrImportant

BITMAPINFOHEADER

QBIT_BICLRUSED

Head.biClrUsed

BITMAPINFOHEADER

QBIT_BIHEIGHT

Head.biHeight

BITMAPINFOHEADER

QBIT_IMAGESIZE

u.QRY.ImageSize

Size of the information that must be processed to display the image.

QBIT_BIPLANES

Head.biPlanes

BITMAPINFOHEADER

QBIT_BISIZE

Head.biSize

BITMAPINFOHEADER

QBIT_BISIZEIMAGE

Head.biSizeImage

BITMAPINFOHEADER

QBIT_BIWIDTH

Head.biWidth

BITMAPINFOHEADER

QBIT_BIXPIXELSPERMETER

Head.biXPelsPerMeter

BITMAPINFOHEADER

QBIT_BIYPIXELSPERMETER

Head.biYPelsPerMeter

BITMAPINFOHEADER

QBIT_COMMENT

Comment

Comment associated with the image

QBIT_NUMIMAGES

u.QRY.NumImages

Not used.

QBIT_PALETTE

ColorTable

The color table stored with the image.

QBIT_SOIMARKER

u.QRY.SOIMarker

File offset in a TIFF JPEG file of the JPEG SOI marker.

ImageSize

Ordinarily, the size of the image file. This is the number of bytes required starting from the beginning of the file in order to access all image header data and all image data. ImageSize may not include information appended to the end of the file, in some formats, whose length is not reflected in the image header data. For TIFF files, ImageSize may include data from more than one image, depending upon the organization of image data in the TIFF file.

AuxSize

Size of the buffer needed to hold all auxiliary data.

ImageNum

Not used.

NumImages

This field is currently always 1 except for TIFF files containing multiple images. In that case, this field is set to the number of images in the TIFF file whenever the ImageNumber field in PIC_PARM is set to 0.

SOIMarker

The file offset of the JPEG SOI marker in a TIFF JPEG file.

SubSampling

If present and lossy JPEG.

Region

LumFactor

If present and lossy JPEG.

ChromFactor

If present and lossy JPEG.

AllowedBitErr

If lossless JPEG.

TIFFFirstByte

Set to first byte of TIFF file ('I' or 'M') if TIFFIFDOffset is being used.

ClusterHeaderVersion

If present for PIC2 files - primarily BI_WAVE files produced by OP_W2D.

DjVuImageType

Not used.

TIFFCompression

TIFFPhotometricInterpretation

If TIFF.

TIFFIFDOffset

Set to the offset of first byte of Get queue within TIFF file if the first byte in the Get queue is the start of a TIFF IFD in the TIFF file. Then TIFFFirstByte must be 'I' or 'M' - the value of the first byte of the TIFF file.

PDFMajorVersion

PDFMinorVersion

If PDF.

PixelDataOffset

If TIFF and there is only one strip, then this is set to the offset within the TIFF file of that strip.

PixelDataSize

If TIFF and there is only one strip, then this is set to the size in bytes of the strip.

TIFFOrientation

TIFFPredictor

TIFFFillOrder

TIFFT4Options

If TIFF.

NumPartitions

For a JPEG2000 image, the number of partitions that is required to extract the components of the image. It is set appropriately depending upon whether there are multiple gray components, or RGB components (which are combined into single partitions), or 3D slices (where PF2_3D_Slices is set in PicFlags2).

JpegOffset For a JPEG image, this is set to the offset in the Get queue of the location of the image. A non-zero value indicates the JPEG image is embedded in another type of file. The field is not used for TIFF files that may contain JPEG images.

 

 


©2022. Accusoft Corporation. All Rights Reserved.

Send Feedback