[ Previous | Next | Contents | Glossary | Home | Search ]
Ultimedia Services Version 2 for AIX: Programmer's Guide and Reference

UMSPCDIPImageReader Object

The UMSPCDIPImageReader object is an Ultimedia Services Version 2 feature and does not apply to Ultimedia Services Version 1.2.1.

The UMSPCDIPImageReader object is derived from UMSImageReader base image reader class. This derived class offers functionality beyond that of the UMSImageReader, but it's methods are not shared among all derived image reader classes. Consequently, this class should be used only when there is a requirement for the extended functionality that it offers. If portability of code across different image formats is important, then applications should use only the UMSImageReader class.

To learn more about Photo CDs and the UMSPCDIPImageReader object, see:

For introductory information, see Formatted File Access Objects.

Type Definitions

typedef struct umsdefPCDpacInfoRec {
   unsigned short version;
   unsigned short piwVersion;
   unsigned short magnification;
   unsigned long scanTime;
   unsigned long modTime;
   char mediaId;
   char mediaType[20];
   char scannerVendor[20];
   char scannerProdID[60];
   char scannerFirmRev[4];
   char scannerFirmDate[8];
   char scannerSerial[20];
   char scannerSize[2];
   char piwEquipment[20];
   char nameCharSet;
   char nameEscapes[32];
   char photofinisher[60];
   char SBAdata[106];
   char copyright;
   char copyrightFile[32];
   } PCDpacInfoRec;
typedef struct umsdefPCDimageData {
   octet *data;
   UMSImageRect bounds;
   unsigned short depth;
   unsigned short stride;
   } PCDimageData;

Method Descriptions

The Photo CD image Pac Image Reader methods include the following additional methods beyond those described in UMSImageReader Object .

ReturnCode point_to_absolute(in UMSImagePoint * src, in UMSImageSize *resolution, out UMSImagePoint dst)

Description

The method converts a source point at the specified resolution to a corresponding point at PCD_ABSOLUTE resolution.

Arguments
in UMSImagePoint * src src specifies a source point.
in UMSImageSize *resolution resolution specifies the resolution of argument src.
out UMSImagePoint dst dst returns the specification of a point at PCD_ABSOLUTE resolution that corresponds with arguments src and resolution.
Return Values

Success

Failure

InvalidArgument

ReturnCode rect_to_absolute(in UMSRect *rect, in UMSImageSize *resolution, out UMSRect dst)

Description

The method converts a rectangle at the specified resolution to a corresponding rectangle at PCD_ABSOLUTE resolution.

Arguments
in UMSRect *rect rect specifies a rectangle (in other words, a subimage).
in UMSImageSize *resolution resolution specifies the resolution of argument rect.
out UMSRect dst dst returns the rectangle definition at PCD_ABSOLUTE resolution that corresponds to the rectangle rect at the resolution of argument resolution.
Return Values

Success

Failure

InvalidArgument

ReturnCode point_to_step(in UMSImagePoint *src, in UMSImageSize *resolution, out UMSImagePoint dst)

Description

The method converts a point at PCD_ABSOLUTE resolution to a corresponding point at the specified resolution.

Arguments
in UMSImagePoint *src src specifies a point at PCD_ABSOLUTE resolution.
in UMSImageSize *resolution resolution specifies a desired resolution.
out UMSImagePoint dst dst returns the point at the desired resolution that corresponds with the defined PCD_ABSOLUTE point.
Return Values

Success

Failure

InvalidArgument

ReturnCode rect_to_step(in UMSRect *src, in UMSImageSize *resolution, out UMSRect dst)

Description

The method converts a rectangle at PCD_ABSOLUTE resolution to a corresponding rectangle at the specified resolution.

Arguments
in UMSRect *src src specifies a rectangle (in other words, subimage) at PCD_ABSOLUTE resolution.
in UMSImageSize *resolution resolution specifies a desired resolution.
out UMSRect dst dst returns a rectangle at the desired resolution that corresponds with argument rect.
Return Values

Success

Failure

InvalidArgument

ReturnCode coord_mult(in UMSImageSize *resolution, out short stepDif)

Description

The method provides the factor by which a dimension at the specified resolution must be multiplied to get an equivalent dimension at PCD_ABSOLUTE resolution.

Arguments
in UMSImageSize *resolution resolution specifies a resolution.
out short stepDif stepDif returns the factor by which a dimension at the specified resolution must be multiplied.
Return Values

Success

Failure

InvalidArgument

ReturnCode read_image_info(out PCDpacInfoRec info)

Description

The caller supplies a pointer to a PCDpacInfo that read Image Pacs structure that it has allocated. The method copies scanning information related to a specific Image Pac into this structure. This information includes copyright information, scanner hardware and software data, scanning parameters, etc. Note: The strings in this structure are not NULL terminated.

Arguments
out PCDpacInfoRec info info returns a pointer to a PCDpacInfoRec structure.
Return Values

Success

Failure

InvalidArgument

MemoryBufferTooSmall

OpenNotCalled

ReturnCode set_ipe_path(in string path)

Description

The method specifies the path to the directory in which files that comprise the Image Pac Extensions are located. This is used only for reading Image Pac files that have been copied from a Photo CD disc to another medium.

Arguments
in string path path specifies the path to the directory in which files that comprise the ImagePac Extensions are located.
Return Values

Success

Failure

InvalidArgument

OpenNotCalled

ReturnCode set_allowance(in long maxBytes)

Description

The method sets the maximum amount of memory used by the toolkit software for its private buffers during processing, in particular for dithering. Larger amounts of memory generally result in better performance. To force the toolkit to use the mimimum amount of memory, set maxBytes to 0. Callers should set the allowance if the format "RGB8PCDDither" is selected. Note that this value can also be changed by changing the PCDImagePac attribute CLASS_UMSImageReaderMem, described in UMSImageReaderMClass Usage .

Arguments
in long maxBytes maxBytes specifies the maximum amount of memory to be used by the toolkit software.
Return Values

Success

Failure

MemoryAllocationFailed

OpenNotCalled

ReturnCode get_allowance(out long maxBytes)

Description

Get the actual amount of memory available to the toolkit for its private data buffers.

Arguments
out long maxBytes maxBytes returns the actual amount of memory available to the toolkit for its data buffers.
Return Values

Success

InvalidArgument

OpenNotCalled

ReturnCode apply_transform(in PCDimageData inPixmap, in UMSImageTransform transform, out PCDimageData outPixmap)

The method creates a new image pixmap by applying the specified transform (rotation and mirroring) to an existing pixmap. The method allocates outPixmap; the caller is responsible for deallocating outPixmap.

Arguments
in PCDimageData inPixmap inPixmap points to the image to be rotated and/or flipped.
in UMSIMageTransform transform transform specifies the transform to be applied to the inPixmap.
out PCDimageData outPixmap outPixmap points to the destination structure where the rotated and/or flipped image is placed.
Return Values

Success

Failure

InvalidArgument

MemoryAllocationFailed

OpenNotCalled

For introductory information, see Formatted File Access Objects.


[ Previous | Next | Contents | Glossary | Home | Search ]