CISaveImage

The CISaveImage component saves an imported graphic image to a different image type (TIFF, JPEG, GIF89, or DCS).

For more information on PageMakers ability to save images to a different file format see "Importing, Linking and Exporting" in PageMaker 6.5's online help.


CISaveImage Class Definition

CISaveImage interace export an image or a vector graphic (PICT, Metafile, and EPS) to an image file format. If EPS file, its preview is used. The supported file formats are: TIFF, JPEG, GIF89, and DCS.

Compliance Finished SaveIt
SetDcsAscii SetDcsCompPreview SetDcsMultiFiles
SetDcsScreenPreview SetEmbedProfile SetFileFormat
SetGifCaption SetGifColorDepth SetGifInterlaced
SetGifPalette SetGifResolution SetGifTransparency
SetIgnoreErrorAlertFlag SetJpegCmykToRgbConversion SetJpegQuality
SetJpegResolution SetRelink SetSaveCrop
SetSaveSep SetSaveStandardDisplay SetTiffColorDepth
SetTiffCompression SetTiffFormat SetTiffPreview
Setup    

void Finished(PMBool bUpdate);

Releases the image that was set in a call to the Setup() method. This is called when the Plug-in is finished with the CISaveImage class. The bUpdate value determines whether the internal version of the image is updated.

void SetRelink(PMBool *pValue);

Links the image in the publication to the new file.

When pValue is set to true, the image in the publication is linked to the new file. If pValue is false, the link for the image does not change.

PMXErr SaveIt();

Saves the graphic image. The image to be save must be specified by the Setup() method before this method is called. If any of the other options are not specified before the SaveIt() method is called, then the default values are used.

void SetDcsAscii(PMBool *pValue);

Sets the option for exporting the image data in the DCS as ASCII values. Set pValueFlag to true for ASCII information (the default on the Windows platforms) or false for binary information (the default on the Macintosh platform).

void SetDcsCompPreview(short *pValue);

Sets the preview resolution for composite printing.

Use the constants imsave_dcspsprvw_none, imsave_dcspsprvw_72dpi, or imsave_dcspsprvw_full for pValue. A -1 is returned in pValue if the file format is not set to DCS.

void SetDcsMultiFiles(PMBool *pValue);

Sets the DCS image to export as one file or as multiple files (one per color.) The pValue flag should be true for mulitiple files (one per color component) or false for a single file with all of the color components included.

void SetDcsScreenPreview(short *pValue);

Sets the screen preview for a DCS image to none, 72dpi, or a full version of the image. Set pValue:

imsave_dcsdspprvw_none
imsave_dcsdspprvw_1bit
imsave_dcsdspprvw_8bit
imsave_dcsdspprvw_24bit

A -1 is returned in pValue if the file format is not set to DCS.

void SetEmbedProfile(PMBool *pValue);

If pValue is true, then the color management profile is included with the image.

void SetFileFormat(short *pFileformat, char *pFilename, unsigned short filenameSize);

Sets the name and file format that the currently set graphic will export. The graphic must be set by the Setup() method before this method is called.

short *pFileFormat;

indicates the file format to save; image_format_tiff, image_format_jpeg, image_format_gif, or image_format_dcs.

char *pFilename;

file name to use to save image. If a file with this name already exists, it will be overwritten.

unsigned short filenameSize;

length of the string pFilename.

Important: The options that are set by many of the other methods in the CISaveImage class, are dependant on the file format set by this method. Set the file format first, and then the other options for the image to be saved.

void SetGifCaption(char *pCaption, unsigned short size);

Set the caption for a GIF image to pCaption.

char *pCaption;

The caption for the GIF.

unsigned short size;

The length of the caption.

size is set to -1 if the file format is not set to GIF.

void SetGifColorDepth(short *pValue);

Sets the number of colors in the color palette for the exported GIF image. The following constants can be used in pValue to set the color depth.

imsave_gifdepth_4
imsave_gifdepth_8
imsave_gifdepth_16
imsave_gifdepth_32
imsave_gifdepth_64
imsave_gifdepth_128
imsave_gifdepth_256

-1 is returned in pValue if the file format is not set to GIF.

void SetGifInterlaced(PMBool *pValue);

Sets the interlaced option for a GIF image. The file format must be set to GIF for this method. Set pValue to true for interlaced, false for non-interlaced

void SetGifPalette(short *pValue);

Sets the palette choice for the GIF image that will be saved. The following constants can be used to set the palette for the image:

imsave_gifpal_exact
imsave_gifpal_adaptiveDither
imsave_gifpal_adaptiveNoDither
imsave_gifpal_netscape
imsave_gifpal_system

pValue will be set to -1 if the file format is not set to GIF.

void SetGifResolution(short *pValue);

Sets the resolution choice for a GIF to be either the original resolution, or a 72dpi image. The following constants can be used to set the GIF resolution choice.

imsave_gifres_image
imsave_gifres_screen

-1 is returned in pValue if the file format is not set to GIF.

void SetGifTransparency(short *pValue);

Sets the color specified in pValue to be used as a transparent background in the exported GIF image.

imsave_giftrans_none
imsave_giftrans_white
imsave_giftrans_black 2

pValue is set to -1 if the file format has not been set to GIF.

SetIgnoreErrorAlertFlag(PMBool bYes);

Causes error messages to be suppressed if the value bYes is set to true. When bYes is false, errors during export of the image will be reported to the user in an error dialog.

void SetJpegCmykToRgbConversion(PMBool *pValue);

Sets the option for converting CMYK information to RGB when saving a JPEG image. If pValue is true the image will be converted to an RGB image.

false; The image will be exported with CMYK colors.

void SetJpegQuality(short *pValue);

Sets the quality option for a JPEG image. There are four levels of quality/compression available from PageMaker, the higher the quality requested, the larger the file will be on disk. The following constants can be used to set the JPEG quality option.

imsave_tiffdepth_1bit
imsave_tiffdepth_4bit
imsave_tiffdepth_8bit
imsave_tiffdepth_mils

If the file format is not set to JPEG a -1 is returned in the parameter pValue.

void SetJpegResolution(short *pValue);

Sets the resolution choice for a JPEG to be either the original resolution, or a 72dpi image. Set pValue to one of the following:

imsave_jpegres_image
imsave_jpegres_screen

The parameter pValue is returned as a -1 if the file format has not been set to JPEG.

void SetSaveCrop(PMBool *pValue);

When pValue is true, only the visible portion of the cropped image is saved, if it is false, then the entire original image is saved to the new format.

void SetSaveSep(PMBool *pValue);

Sets the attribute for saving the image to separations. Set pValue false and a composite image is saved, if pValue is true the image is separated.

void SetSaveStandardDisplay(PMBool *pValue);

Turns on the attribute for exporting the screen representation of the image. If pValue is set to true this method prepares SaveIt() to export the screen version of the image. If pValue is false the imported version of the graphic will be used when SaveIt() is called.

void SetTiff6Compliance(PMBool *pValue);

Sets the value for strict compliance to the TIFF 6.0 specification. Set pValue to true and exported TIFF graphics will not use any extentions to the TIFF 6.0 specification. If pValue is false, the exported TIFF will allow for extentions to the TIFF 6.0 specification.

void SetTiffColorDepth(short *pValue);

Sets the color depth for the image to be saved. The following constants can be used to set the color depth of the TIFF.

imsave_tiffdepth_1bit
imsave_tiffdepth_4bit
imsave_tiffdepth_8bit
imsave_tiffdepth_mils

A -1 is returned in pValue if the file format is not set to TIFF.

void SetTiffCompression(short *pValue);

Sets the compression attribute used by the SaveIt() method. The following constants can be used: for pValue

imsave_tiffcompr_none
imsave_tiffcompr_moderate
imsave_tiffcompr_max
imsave_tiffcompr_maxlossy

A -1 is returned in pValue if the file format has not been set to TIFF.

void SetTiffFormat(short *pValue);

Set the type of TIFF image that will be saved. (The options are base - or normal, optimised for seperations, and optimised for large images.)

The following values can be used to set the type of TIFF image that will be written.

imsave_tiffdata_base
imsave_tiffdata_sep
imsave_tiffdata_largeimage

A -1 is returned in pValue if the file format is not set to TIFF.

void SetTiffPreview(short *pValue);

Sets the TIFF preview option export, when exporting an image for color separation. The following constants can be used to set the TIFF preview.

imsave_tiffprvw_none
imsave_tiffprvw_draft
imsave_tiffprvw_best

Return A -1 is returned in pValue if the file format is not TIFF, or if the SetSaveSep option has not been set.

PMXErr Setup()

Set up to export the currently selected graphic. If more than one object is selected, or if the selected object is not a graphic object, then the method fails and an error is returned.

PMXErr Setup(PMOBJ_REC *pPMObjRec);

Set up to export the graphic specified by pPMObjRec. The object does not need to be selected to be exported. CQ_FAILURE is returned to indicate an error occured, including an invalid PMOBJ_REC or attempting to use Setup() with an object that is not an imported graphic.


Copyright © 1996, Adobe Systems Incorporated. All rights reserved.

Comments or suggestions? Contact Adobe Developer Support