InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IImageWriteFormat Class Referenceabstract

#include <IImageWriteFormat.h>

Inheritance diagram for IImageWriteFormat:
IPMUnknownCImageWriteFormat

Public Types

enum  { kOptionSetImage = 1 }
 

Public Member Functions

virtual bool16 SetImageAttributes (IImageAttributes *iImageAttributes)=0
 
virtual bool16 Open (IPMStream *iPMStream)=0
 
virtual bool16 Close ()=0
 
virtual bool16 SetFormatOption (uint32 formatOption, uint32 formatData)=0
 
virtual bool16 WriteData (IImageStream *iImageStream)=0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Detailed Description

Interface defining the mechanism for writing an image to a stream.

Image format writing sequence:

First, a client should call Open to begin a write session. It should then call SetFormatOption (if required), SetImageAttributes, and WriteData. This sequence of calls to SetFormatOption, SetImageAttributes, and WriteData may be called as necessary if multiple images per file are supported. Close should then be called to terminate the write session.

See Also
IImageReadFormat

Member Function Documentation

virtual bool16 IImageWriteFormat::Close ()
pure virtual

Terminates a write session started by a prior call to Open.

Returns
kTrue if the method succeeds, else kFalse

Implemented in CImageWriteFormat.

virtual bool16 IImageWriteFormat::Open (IPMStreamiPMStream)
pure virtual

Initializes a writer for a write session to the specified stream.

Parameters
iPMStreamIN The stream to write to
Returns
kTrue if the method succeeds, else kFalse

Implemented in CImageWriteFormat.

virtual bool16 IImageWriteFormat::SetFormatOption (uint32 formatOption,
uint32 formatData 
)
pure virtual

Sets an additional option for the image write. Only option supported at this point is whether to write high res (kPMHighResImage) or low res (kPMLowResImage) image.

Parameters
formatOptionIN The selector for the option to set
formatDataIN The data for the option
Returns
kTrue if the method succeeds, else kFalse

Implemented in CImageWriteFormat.

virtual bool16 IImageWriteFormat::SetImageAttributes (IImageAttributesiImageAttributes)
pure virtual

Sets the image attributes to use when writing the image. Unlike reading, image attributes are required before writing the image data.

IMPORTANT: If the format supports more than one image per file, then the attributes set are those for the current image (via the SetFormatOption call).

Parameters
iImageAttributesIN The image attributes to use for the write
Returns
kTrue if the method succeeds, else kFalse

Implemented in CImageWriteFormat.

virtual bool16 IImageWriteFormat::WriteData (IImageStreamiImageStream)
pure virtual

Reads source data from the given IImageStream and writes to the output stream.

Note: The format may read the data in any row, plane, or layer order. Also, Because the format is driving the interaction, it is responsible for posting the progress bar.

Parameters
iImageStreamIN The source input stream
Returns
kTrue if the method succeeds, else kFalse

Implemented in CImageWriteFormat.