PICTools Programmer's Reference
PIC_PARM

The PIC_PARM structure has information to control the Pegasus and PegasusQuery operations. This structure is divided into two parts: information common to all or most operations, and information specific to a particular operation. Depending on the operation, each field of the PicParm structure may be: an input parameter describing attributes of the operation to be performed, an output parameter describing the results of the operation, both an input and output parameter, or not used.

We recommend "zeroing" the contents of this structure before setting any fields for the operation.

 
Copy Code
typedef struct {
   PICINTPTRT                         Reserved0;
   LONG                               ParmSize;
   BYTE                               ParmVer;
   BYTE                               ParmVerMinor;
   WORD                               Reserver1;
   LONG                               Status;
   OPERATION                          Op;
   BITMAPINFOHEADER                   Head;
   RGBQUAD                            ColorTable[272];
   LONG                               PicVer;
   ORIENTATION                        VisualOrient;
   LONG                               CommentSize;
   LONG                               CommentLen;
   CHAR PICHUGE*                      Comment;
   LPARAM                             App;
   LONG                               PercentDone;
   WORK_AREA PICHUGE*                 Reserved;
   QUEUE                              Get;
   QUEUE                              Put;
   BYTE                               KeyField[8];
   LONG                               (*DeferFn)(struct PIC_PARM *, RESPONSE);
   DWORD                              Flags;
   DWORD                              Flags2;
   WORD                               CropWidth;
   WORD                               CropHeight;
   WORD                               CropXoff;
   WORD                               CropYoff;
   DWORD                              ImageNumber;
   DWORD                              PacketType;
   DWORD                              SeekInfo;
   CHAR PICHUGE*                      PIC2List;
   LONG                               PIC2ListSize;
   LONG                               PIC2ListLen;
   REGION                             RegionIn;
   REGION                             RegionOut;
   WORD                               OpVersion0;  
   WORD                               OpVersion1;
   WORD                               OpVersion2;
   WORD                               OpVersion3;
   BYTE PICHUGE*                      stkReserved;
   BYTE PICHUGE*                      opcodeExtraPtr;
   BYTE PICHUGE*                      ReservedPtr3;
   BYTE PICHUGE*                      ReservedPtr4;
   BYTE PICHUGE*                      ReservedPtr5;
   BYTE PICHUGE*                      ReservedPtr6;
   BYTE PICHUGE*                      ReservedPtr7;
   BYTE PICHUGE*                      ReservedPtr8;
   CHAR PICHUGE*                      LoadPath;
   PICINTPTRT                         LoadResInstance;
   struct PIC_PARM_TAG PICHUGE*       NestPP;
   REQUEST                            NestReq;
   PICINTPTRT                         tlsReserved;
   PICINTPTRT                         tlsReserved2;
   PICINTPTRT                         memReserved;
   PICINTPTRT                         wrapReserved;
   PICINTPTRT                         wrapReserved2;
   WORD                               DispVersion0;
   WORD                               DispVersion1;
   WORD                               DispVersion2;
   WORD                               DispVersion3;
   PICINTPTRT                         DispExports;
   PICINTPTRT                         tlsReserved3;
   PICINTPTRT                         tlsReserved4;
   PICSIZET                           IOCropXoff;
   PICSIZET                           IOCropYoff;
   PICSIZET                           IOCropWidth;
   PICSIZET                           IOCropHeight;
   PICINTPTRT                         tlsReserved5;
   PICINTPTRT                         tlsReserved6;
   PICINTPTRT                         NumberOfThreadsAllowed;
   PICINTPTRT                         NumberOfThreadsUsed;
   PICINTPTRT                         SeekOffsetLow;
   PICINTPTRT                         SeekOffsetHigh;
   PICINTPTRT                         Reserveds[88];
   union {
      PEGQUERY                        QRY;
      DIB_INPUT                       D2J;
      DIB_OUTPUT                      J2D;
      TRANS2P                         S2P;
      TRANP2S                         P2S;
      D2F_STRUC                       D2F;
      F2D_STRUC                       F2D;
      UTL_STRUC                       UTL;
      LOSSLESS3                       LL3;
      CAMERARAWE                      CRE;
      REORIENT                        ROR;
      ZOOM_PARMS                      ZOOM;
      WAVELET                         WAVE;
      PNG_UNION                       PNG;
      PNGT_UNION                      PNG_T;
      WSQ_UNION                       WSQ;
      DIB_OUTPUT                      P2D;
      DIB_OUTPUT                      S2D;
      TIFF_EDIT                       TED;
      MODCA_UNION                     Modca;
      CLEAN                           CLN;
      SCANFIX                         SF;
      IDP_UNION                       IDP;
      J2K_UNION                       J2K;
      J2KT_UNION                      J2KT;
      SB_PARMS                        SB;
      JLS_UNION                       JLS;
      PDF_UNION                       PDF;
      JBIG2_UNION                     JBIG2;
      JPIP_UNION                      JPIP;
      ADJUST                          ADJ;
      PERSADJUST                      PERS;
      CAD_UNION                       CAD;
      HDP_UNION                       HDP;
      DIB_INPUT                       D2S;
      DIB_OUTPUT                      S2D;
      DIB_OUTPUT                      P2D;
      INTERNAL                        Reserved;
   } u;
} PIC_PARM;

Fields:

Name Description

Reserved0

Reserved.  The field should be set to 0 by the application.

ParmSize

Specifies the size of the PicParm structure.  The value is used by the operation to verify that this is the proper structure.  The field is input by the application.

ParmVer

Specifies the current major version of the PicParm structure.  Currently it must be set to CURRENT_PARMVER.  This field is input by the application.

ParmVerMinor

Specifies the current minor version of the PicParm structure.  The default is 1. On a per-opcode basis, this may be set to other than 1. This document contains the appropriate value for ParmVerMinor for each opcode in the usage section for each opcode. The changes.txt file will call out any change to this value required by any of the opcodes. This field is input by the application.

Reserver1

Reserved.  The field should be set to 0 by the application.

Status

Specifies the error value when RES_ERR is returned.  Status has the value ERR_NONE unless RES_ERR is returned. A negative value is returned for Status when an error occurs. See ERRORS.H for descriptive names for the error numbers. Positive values are reserved for use by the application.  This field is output by Pegasus.

Op

Specifies the specific operation to be performed. This field is input by the application. The possible values for this field are:

Opcode

Meaning

OP_ADJUST

Adjust image color and highlights

OP_BINARIZE

Convert color or grayscale image to black and white

OP_CAD2D

Convert CAD to DIB

OP_CAMERARAWE

Expand a RAW digital camera file

OP_CLEAN

Correct deficiencies or enhance image features

OP_D2F

DIB transformed to supported image file format

OP_D2FPLUS

OP_D2F plus GIF

OP_D2J

DIB compressed to sequential or Progressive JPEG

OP_D2MDCA

Compress to MODCA / CALS

OP_D2PDF

Inserts a DIB into a PDF file (SJPEG, G3/4, JBIG2)

OP_D2S

DIB compressed to sequential JPEG

OP_D2SE

DIB compressed to enhanced sequential JPEG

OP_D2SEPLUS

OP_D2SE plus compress to 12-bit JPEG

OP_D2W

DIB compressed using wavelet

OP_EXP4

IM4 expanded to DIB

OP_F2D

Supported image file format transformed to DIB

OP_F2DPLUS

OP_F2D plus GIF and TIFF/LZW

OP_HDPHOTOE

Microsoft HD Photo Expand

OP_HDPHOTOP

Microsoft HD Photo Pack

OP_JBIG2E

Expand JBIG2

OP_JBIG2P

Compress to JBIG2

OP_J2KE

JPEG2000 Decompression

OP_J2KE3D

JPEG2000 Decompression with 3D

OP_J2KERGB

JPEG2000 Decompression limited to RGB and 8bpp gray

OP_J2KP

JPEG2000 Compression

OP_J2KP3D

JPEG2000 Compression with 3D

OP_J2KPRGB

JPEG2000 Compression limited to RGB and 8bpp gray

OP_J2KTRANSCODE

JPEG2000 Transcode

OP_JLSE

JPEG LS Decompression

OP_JLSP

JPEG LS Compression

OP_JPIPCLIENT

JPIP client

OP_JPIPSERVER

JPIP server

OP_LIE3

IMStar or lossless JPEG expanded to DIB

OP_LIE3PLUS

IMStar or 16-bit lossless JPEG expanded to DIB

OP_LIP3

DIB compressed to IMStar or lossless JPEG

OP_LIP3PLUS

DIB compressed to IMStar or 16-bit lossless JPEG

OP_MDCA2D

MODCA / CALS Expand

OP_P2D

Progressive JPEG expanded to DIB

OP_P2S

Progressive JPEG transformed to sequential JPEG

OP_PDF2D

Extract a DIB from a PDF file (SJPEG, G3/4, JBIG2)

OP_PERSADJUST

Perspective adjustment of object in image

OP_PNGE

PNG expanded to DIB

OP_PNGP

Compress to PNG

OP_PNGTRANSCODE

PNG file optimizer

OP_RIDP2

Receive IDP - supports J2K

OP_RORE

Sequential JPEG lossless rotation/inversion/enhancement

OP_S2D

Sequential JPEG expanded to DIB

OP_SE2D

Enhanced Sequential JPEG expanded to DIB

OP_SE2DPLUS

OP_SE2D plus expand 12-bit JPEG

OP_S2P

Sequential JPEG transformed to progressive JPEG

OP_TIDP2

Transmit IDP - supports J2K

OP_UTL

Color reduction utility

OP_W2D

Wavelet expanded to DIB

OP_WSQE

Expand WSQ format

OP_WSQP

Compress to WSQ format

OP_ZOOM

DIB size changed or converted to grayscale/halftone

OP_ZOOM2

DIB size changed or converted to grayscale/halftone

Head

Specifies a BITMAPINFOHEADER structure, as defined by Windows, that contains information about the dimensions and color format of the image.  In general, Head is input by the application and is also output by Pegasus.

When a DIB is the result of an operation, Head is output by Pegasus for the DIB before the first pixel of the DIB is returned from the operation, typically by the time REQ_INIT is finished.  When a DIB is the source for an operation, Head is input by the application and must describe the DIB before Pegasus is called with a REQ_INIT request.  For other operations, it may be input or output or both.  See the operation-specific documentation.

Head.biClrUsed and Head.biClrImportant refer to the following ColorTable field.  Therefore, and since ColorTable immediately follows Head, a pointer to this field can be treated as a pointer to a BITMAPINFO structure, for example for use as a parameter to a call to the Windows function SetDIBitsToDevice.

ColorTable

Specifies an array of RGBQUAD structures that specify up to 256 primary colors and up to 16 secondary colors.  ColorTable is input or output or both in similar circumstances and for similar operations as the Head field.  See the operation-specific documentation.

PicVer

Specifies the version number of the PIC algorithm used to create the PIC image.  The PIC algorithms place an algorithm version number into the image when compressing an image.  When decompressing an image, this number is retrieved from the image to ensure the proper algorithm is applied. The difference between this field and the ParmVer field is that ParmVer specifies the PIC_PARM structure version.  This field is output by Pegasus.

VisualOrient

This field is provided for use by the application.  It is intended to be descriptive of the image orientation when displayed.  It is not used by the PICTools operations except that they allow the value to be stored with the image and retrieved from the image.  This field is input by the application for operations creating an image format which supports the field.  It is output by Pegasus for operations which take as input an image format which support the field.

Note that it is not always obvious when an image is rotated 180° clockwise versus when the image is inverted by being reflected across the image horizontal midpoint. In the first case, you could read text in the image by standing on your head.  In the second case, you could read text in the image by standing on your head and looking at the image in a mirror.  (Please don't try this at home.)  Combining the two yields an image which is right-side up, but mirror-reversed.  The possible values are:

Value

Meaning

O_normal

No rotation, not inverted

O_inverted

No rotation, inverted (reversed across horizontal midpoint)

O_r90

Rotated 90° clockwise

O_r90_in

Rotated 90° clockwise, then inverted

O_r180

Rotated 180°

O_r180_in

Rotated 180°, then inverted (this is mirror-reversed)

O_r270

Rotated 270° clockwise

O_r270_in

Rotated 270° clockwise, then inverted

O_w_on_b

Monochrome, negative image

O_bit_rev

Monochrome, reversed pixel order image

In order to reverse the visual orientation, to create an image which appears to be oriented correctly, you would supply the following values to the PICTools rotate opcode (OP_ROR):

Visual Orientation

Rotate

O_normal

O_normal

O_inverted

O_inverted

O_r90

O_r270

O_r90_in

O_r270_in

O_r180

O_r180

O_r180_in

O_r180_in

O_r270

O_r90

O_r270_in

O_r90_in

CommentSize

Specifies the size of the buffer pointed to by the Comment field.  This field is always input by the application.

If the application does not care to have image comments returned, then CommentSize is set to 0.

When an image format supporting comments is output from the operation, it is not necessary to set this field in order to specify the comment for the output image.  Comment and CommentLen are the significant fields in that case.

When an image format supporting comments is input to the operation, the application has two ways to retrieve any image comment(s).  The first way, when the application knows the largest size the comment can be or wants to limit the size which is returned, is to pre-allocate a comment buffer of the desired size.  CommentSize is set to the size of the pre-allocated comment buffer.  If a comment is encountered, and the length of the comment is larger than CommentSize, then only CommentSize bytes will be returned.

The second way, when the application wants to be certain it receives all comment data, it sets the PF_AllocateComment flag in the PicFlags field in the operation structure. If Pegasus encounters a comment, it will return to the application with a RES_ALLOCATE_COMMENT_BUF response.  Pegasus will have set CommentLen to the required length for the comment.  The application allocates a buffer of the required size, sets CommentSize to the allocated size, and continues the operation.  If Pegasus encounters another comment it will return a RES_HAVE_COMMENT response.  The application can save the previous comment's data as desired, and then continue the operation.  Pegasus will immediately return a RES_ALLOCATE_COMMENT_BUF response and the application can allocate a buffer exactly the size of the comment.

Pegasus stores and retrieves the comment as binary data.  No trailing null terminator is added by Pegasus. Therefore, when the image may have been created by a different application, it is suggested that CommentSize be one byte larger than necessary to allow a trailing null terminator to be added by the application.

CommentLen

Specifies the length of the comment in the image.  This field is output by Pegasus.  When Pegasus returns a RES_ALLOCATE_COMMENT_BUF response, this field has been set to the length of the encountered comment, but the comment has not been copied to the comment buffer.  When Pegasus returns a RES_DONE or RES_HAVE_COMMENT response, this field has been set to the number of bytes returned for the last encountered comment.  If CommentSize were not large enough for the entire comment to be returned, then CommentLen will be equal to the number of bytes copied, which will be equal to CommentSize.

If the comment buffer is large enough for the entire comment, then CommentLen is the exact size of the comment regarded as binary data.  If the comment were stored with a null terminator, then CommentLen will include the null terminator.  Otherwise, CommentLen will not include a null terminator.

Comment

Points to a buffer for an image.  This field is input by the application.  For operations where the output image format supports comments, the application will copy the comment to be stored with the image to this buffer.  For operations where the input image format supports comments, Pegasus will copy image comment(s) to this buffer.  If Comment is not used to point to a buffer for a comment, it must be NULL.

App

This field is reserved for the private use of the application.  It provides a method for the application to include application-specific data in the PIC_PARM structure. This field is input by the application if desired.

PercentDone

Specifies the progress of the operation.  The value will be between 0 and 100 and will only be 100 upon completion of the operation.  This field is output by Pegasus for some operations.

Reserved

This field is reserved for the private use of Pegasus.  It must be set to 0 by the application before Pegasus is called with a request of REQ_INIT.  It will be set to 0 by Pegasus when Pegasus returns RES_ERR and when Pegasus returns after it is called with a request of REQ_TERM.

Get

Points to a circular queue that holds input data for all Pegasus operations.  This buffer is allocated and freed by the user.  For additional information, see the description of the QUEUE structure and see the Queue Management section in the PICTools and AIMTools Programmer's Guide.

Put

Points to a circular queue to hold output data for all Pegasus operations.  This buffer is allocated and freed by the user.  For additional information, see the description of the QUEUE structure and see the Queue Management section in the PICTools and AIMTools Programmer's Guide.

KeyField

Specifies a password to use when compressing and decompressing the image.  KeyField contains a password when the first byte is not 0.  In this case, KeyField is regarded as 8 bytes of binary data and all 8 bytes are significant.  If you use a password to protect a file, the image file will be quite difficult to decompress without the correct password.  If decompressed by PICTools and if the identical 8 binary bytes are not provided, Pegasus will return an error status of ERR_INVALID_KEY. If all 8 bytes of the KeyField field are 0, and the image requires a password, Pegasus will return an error status of ERR_MISSING_KEY. If a file does not require a password, it will be decompressed without error whether or not KeyField contains a password. This field is input by the application.

For some image formats, only the image data itself is protected by KeyField when some tool other than PICTools is used to examine the image file.  Comments, application data, etc. may not be protected by KeyField for these other tools.

This feature is supported only by these opcodes: OP_D2S, OP_D2SE, OP_D2SEPLUS, OP_S2D, OP_SE2D, OP_SE2DPLUS, OP_S2P, OP_LIP3, OP_LIP3PLUS, OP_LIE3PLUS, OP_D2W and OP_W2D.

DeferFn

Specifies a function to use for notifying the application of events which occur during an operation.  Ordinarily, when an event occurs during an operation (e.g. RES_GET_NEED_DATA), Pegasus returns to the application with the appropriate response code.  For some CPU or O/S environments, this approach may be inconvenient or impractical.  In those environments,  DeferFn is used by Pegasus instead.  The PIC_PARM parameter is the same data structure which was passed to Pegasus.  The RESPONSE parameter identifies the event.  DeferFn is not called for RES_ERR and RES_DONE events.   Pegasus must not be called from within the DeferFn function or any function the DeferFn calls.  If the application wants to continue the operation, it returns 0.  If the application wants to abort the operation, it returns a non-zero value.  Note that when using the defer function from OP_SCANFIX for RES_QUERY calls, a non-zero return value will result in an output image not being returned; the ScanFixReportData.Stop value should be used for terminating the operation and returing the image in its current state.

Flags

Value

Meaning

F_Crop

For certain opcodes, if F_Crop is set, then CropWidth, CropHeight, CropXoff and CropYOff specify the cropping rectangle.  Otherwise there is no cropping rectangle.

F_Raw

Set if REGION structure data is to be used for image parameters instead of Head.

F_UseDeferFn

When this flag is set and DeferFn points to a DeferFn callback function, then the opcode uses callback mode for returning responses other than RES_DONE and RES_ERR instead of using coroutine mode. See Appendix 2 for additional information on F_UseDeferFn.

F_UseAlternateCoroutine

This flag can be used when DeferFn is not used.  If this flag is set on Windows, Pegasus will use a coroutine implementation which is based on Win32/x64 fibers. See Appendix 2 for additional information on F_UseAlternateCoroutine. This may be relevant if the client is also using fibers: 

  • If your application uses fibers in a thread calling Pegasus in alternate coroutine mode, convert the thread to a fiber before ever calling Pegasus in the thread and don't convert the fiber back to a thread until completely finished calling Pegasus in the thread.
  • If your application doesn't use fibers in a thread calling Pegasus in alternate coroutine mode, Pegasus will convert the thread to a fiber.  In that case, if you call PegasusLibTerm in a different thread, but never having called PegasusLibThreadTerm in the thread that called Pegasus in alternate coroutine mode, then the dispatcher cannot convert the fiber back to a thread and a small amount of memory will be leaked.
  • If your application doesn't use fibers in a thread calling Pegasus in alternate coroutine mode, and if your application uses multiple dll's each linked to a static library dispatcher, and if the different dll's might each have active Pegasus operations in alternate coroutine mode in the same thread, then you can't safely call the PegasusLibThreadTerm function of any static library dispatcher until all Pegasus operations in alternate coroutine mode in the thread are finished.

Any REQ_CONT operation must be invoked in the context of the fiber under which the previous operation (REQ_INIT or REQ_EXEC) was invoked, regardless of whether the fiber was created by Pegasus or by the client. If this flag is set, and if the client application is multithreaded, any REQ_CONT operation must be invoked in the context of  the thread under which the previous operation (REQ_INIT or REQ_EXEC) was invoked.  New threads can not be used for REQ_CONT operations. If this flag is not set, the legacy coroutine implementation will be used.

F_UseStackSwitchCoroutine

Forces an internal stack-switch implementation for coroutines on a platform where that is not the default implementation.  A stack-switch implementation may be marginally faster on some platforms, but is not as "well-behaved" from the point of view of the operating system which may rely on undocumented stack layout items for features such as exception or signal handling.  See also F_UseAlternateCoroutine and F_UseDeferFn that override this flag. See Appendix 2 for additional information on F_UseStackSwitchCoroutine.

F_InputCrop

Same as F_Crop, but uses the larger IOCrop* fields in PIC_PARM allowing crop coordinates larger than 65535 to be specified.  Cropping coordinates are with respect to the input image.  Although they will be close to the same, cropping with F_InputCrop does not necessarily give the identical pixel values as cropping the input image before passing to the opcode or as cropping the output image after the opcode operation has output an uncropped image. This flag is currently supported only by the following opcodes: OP_CAD2D, OP_HDPHOTOE, OP_MDCA2D, OP_ZOOM2, OP_BINARIZE and OP_JLSE.

F_OutputCrop

Where an opcode supports it, this is the same as F_InputCrop, except cropping coordinates are with respect to the output image.  Also cropping with F_OutputCrop gives the identical pixel values as cropping outside of the opcode after the opcode operation has output an uncropped image.

Flags2

Reserved.  The field should be set to 0 by the application.

CropWidth

CropHeight

CropXoff

CropYoff

These fields are used to specify a cropping rectangle within an image for certain opcodes when F_Crop is set in Flags.


ImageNumber

This field is used to specify a particular image in a multi-image input file.

PacketType

When RES_EXTEND_PIC2LIST response is returned, the type of the packet which was encountered and for which there was insufficient space is returned in PacketType.  The application can look at the PacketType to decide whether or not to provide space for the packet.

SeekInfo

Specifies an offset into the input or output stream which is required by the Pegasus operation.  Its value is only defined after Pegasus has returned a RES_SEEK response and until the operation is continued.  This field is output by Pegasus.  If the SEEK_FILE bit of SeekInfo is clear, then a location in the input stream is specified.  Otherwise a location in the output stream is specified.  If the SEEK_DIRECTION bit of SeekInfo is clear, then the desired offset is the SeekInfo offset regarded as the absolute offset from the beginning of the stream.  Otherwise, the desired offset is computed by subtracting the SeekInfo offset from the offset of the end of the stream.  In both cases, the SeekInfo offset is bits 0 through 29 of SeekInfo.  It is most easily retrieved using ( SeekInfo & SEEK_OFFSET ) to strip off the SEEK_FILE and SEEK_DIRECTION bits.

When seeking in the output stream, Pegasus will already have returned RES_PUT_NEED_SPACE responses until the application emptied the output queue.  The application should regard the next data output from the operation as beginning at the specified offset.

When seeking in the input stream, Pegasus will already have consumed all the data in the input queue, although it may not have emptied the queue.  The application should set the queue to empty and should supply data to the queue beginning at the specified offset in response to the current RES_SEEK or in response to RES_GET_NEED_DATA.

PIC2List

A pointer to a buffer to receive PIC2List information for opcodes supporting PIC2List data.

PIC2ListSize

The size of the PIC2List buffer.

PIC2ListLen

The length of the currently returned data in the PIC2List buffer.

RegionIn

Reserved.  The field should be set to 0 by the application.

RegionOut

Reserved.  The field should be set to 0 by the application.

OpVersion0

OpVersion1

OpVersion2

OpVersion3

64-bit FileVersion for opcode at REQ_EXEC/RES_DONE.  This has the same values as the FileVersion in the opcode DLL's version resource.

stkReserved

Reserved for internal use

opcodeExtraPtr

Points to one of the *_EXTRA structures or 0.  Before using, the *_EXTRA structure must be memset(&_EXTRA, 0, sizeof(_EXTRA) and _EXTRA.ExtraSize = sizeof(_EXTRA)

ReservedPtr3

ReservedPtr4

ReservedPtr5

ReservedPtr6

ReservedPtr7

ReservedPtr8

Reserved.  These fields should be set to 0 by the application.

LoadPath

This can be the explicit folder containing the opcode DLL. (see LoadResInstance discussion next.)

LoadResInstance

Module instance handle of an EXE or DLL from whose resource data the opcode DLL is to be loaded. The rules for using LoadPath and LoadResInstance are as follows:

if LoadPath == 0 && LoadResInstance == 0 then the opcode DLL is loaded from the same directory as the dispatcher DLL.  If not found there then the opcode DLL is loaded using the directory order Windows uses when loading DLLs

if LoadPath != 0 && LoadResInstance == 0, then the opcode DLL is loaded from the specified directory

if LoadPath == 0 && LoadResInstance != 0 then the opcode DLL is loaded from the specified module's resource data

if LoadPath != 0 && LoadResInstance != 0  then the opcode DLL is loaded from the specified module's resource data.  If not found there, then the opcode DLL is loaded from the specified path. If LoadPath is "", and the opcode DLL is not found in the specified module's resource data, then the opcode DLL is loaded as though LoadPath == 0 && LoadResInstance == 0

NestPP, ..., wrapReserved2

Reserved.  These fields should be set to 0 by the application.

DispVersion0

DispVersion1

DispVersion2

DispVersion3

64-bit FileVersion for Dispatcher at REQ_EXEC/RES_DONE.  This has the same value as the FileVersion in the dispatcher DLL's version resource.

DispExports, ..., tlsReserved6

Reserved.  These fields should be set to 0 by the application.

IOCropXoff

IOCropYoff

IOCropWidth

IOCropHeight

32-bit cropping coordinate fields for opcodes that support setting the F_InputCrop flag or the F_OutputCrop flag.

NumberOfThreadsAllowed

Certain opcodes can operate in a multithreaded manner.  For those opcodes, this field specifies the number of threads to be used by the opcode (including the thread used to invoke the opcode.)  A general rule of thumb is to set this field to the number of processors or processor cores available on the host hardware platform.  To specify single threaded operation, set this field to zero or one.

The following opcodes support multithreading:

  • OP_J2KP
  • OP_J2KE
  • OP_J2KPRGB
  • OP_J2KERGB
  • OP_J2KP3D
  • OP_J2KE3D

NumberOfThreadsUsed

This is set by the opcode and indicates the  number of threads actually used by the opcode (including the thread used to invoke the opcode.)  For opcodes that do not support multithreading, this will be set to zero.

SeekOffsetLow

SeekOffsetHigh

For opcodes that support seeking to past the 30-bit offsets offered by SeekInfo, these fields allow offsets up to 64-bits (for 32-bit platform opcodes) to be specified.  (SeekOffsetHighis always 0 on a 64-bit platform opcode).  For an opcode that supports these, one or both of these fields will be set to a non-zero value and then both fields in combination specify the same seek offset for RES_SEEK and RES_POKE that SeekInfospecifies.  However since SeekInfouses bits 30 and 31 to specify which queue is seeking and whether seeking forward from the beginning or backward from the end, SeekOffsetLowwith SeekOffsetHighis the only way for an opcode to specify offsets larger than 30 bits.  SeekInfobit 31 (SEEKINFO_BACK_FROM_END) and SeekInfobit 30 (SEEKINFO_PUT_QUEUE) should still be used to determine the queue and the direction of the offset.  Opcode-independent code that also works on opcodes that don't yet support these fields, can be written by always looking at these fields when RES_SEEK or RES_POKE is returned.  If either of these fields are non-zero, then these fields are used for the seek offset, otherwise SeekInfo& SEEK_OFFSET is the seek offset.

Reserveds[88]

This field should be set to 0 by the application.

u

Specifies a union of structures which hold information about a specific operation.  The operation structure within the union is discriminated using the opcode is specified by the PIC_PARM Op field.  See the Operation Structures section for additional information.  The structure used by each operation is:

Opcode

Operation-Specific Structure

OP_ADJUST

ADJUST

OP_BINARIZE

SB_PARMS

OP_CAD2D

OP_CAD

OP_CAMERARAWE

CAMERARAWE

OP_CLEAN

CLEAN

OP_D2F

D2F_STRUC

OP_D2FPLUS

D2F_STRUC

OP_D2J

DIB_INPUT

OP_D2PDF

PDF_UNION

OP_D2S

DIB_INPUT

OP_D2SE

DIB_INPUT

OP_EXP4

DIB_OUTPUT

OP_F2D

F2D_STRUC

OP_F2DPLUS

F2D_STRUC

OP_HDPHOTOP

HDP_UNION

OP_HDPHOTOE

HDP_UNION

OP_JBIG2E

JBIG2_UNION

OP_JBIG2P

JBIG2_UNION

OP_J2KE

J2K_UNION

OP_J2KP

J2K_UNION

OP_J2KTRANSCODE

J2KT_UNION

OP_LIE3

LOSSLESS3

OP_LIE3PLUS

LOSSLESS3

OP_LIP3

LOSSLESS3

OP_LIP3PLUS

LOSSLESS3

OP_PDF2D

PDF_UNION

OP_PERSADJUST

PERSADJUST

OP_PNGP

PNG_UNION

OP_PNGE

PNG_UNION

OP_PNGTRANSCODE

PNGT_UNION

OP_P2D

DIB_OUTPUT

OP_P2S

TRANP2S

OP_ROR

REORIENT

OP_S2D

DIB_OUTPUT

OP_SE2D

DIB_OUTPUT

OP_S2P

TRANS2P

OP_UTL

UTL_STRUC

OP_ZOOM

ZOOM_PARMS

OP_W2D

WAVELET

OP_D2W

WAVELET

 

 

 


©2022. Accusoft Corporation. All Rights Reserved.

Send Feedback