![]() | InDesign SDK 20.5 |
#include <IImageStreamManager.h>

Public Types | |
| enum | { kDefaultIID = IID_IIMAGESTREAMMANAGER } |
| enum | ResamplingType { kSubsample, kDownsample, kBicubicDownsample, kSubAverage } |
Public Member Functions | |
| virtual void | SetSourceAttributes (IImageAttributes *srcImageAttributes)=0 |
| virtual void | SetDestinationAttributes (IImageAttributes *dstImageAttributes)=0 |
| virtual void | SetFirstImageStreamSegment (IImageStream *firstImageStreamSegment)=0 |
| virtual void | SetResamplingType (ResamplingType resample)=0 |
| virtual void | SetCache (uint8 *cacheptr)=0 |
| virtual void | SetDoDiffusion (bool16 yesno)=0 |
| virtual void | SetGrayThreshold (uint8 threshold)=0 |
| virtual void | SetReadAlphaChannelOnly (uint16 channelIndex)=0 |
| virtual void | SetWhiteIsZeroForPlanarChannels (bool16 yesno)=0 |
| virtual void | SetSourceProfile (IPMUnknown *ownerItem)=0 |
| virtual void | SetSourceProfile (ICMSProfile *srcProfile)=0 |
| virtual void | SetSourceAGMColorSpace (AGMColorSpace *srcAGMColorSpace)=0 |
| virtual void | SetDestinationProfile (IPMUnknown *ownerItem)=0 |
| virtual void | SetDestinationProfile (ICMSProfile *dstProfile)=0 |
| virtual void | SetDestinationAGMColorSpace (AGMColorSpace *dstAGMColorSpace)=0 |
| virtual uint32 | GetNumberOfTasks ()=0 |
| virtual IImageStream * | QueryImageStream ()=0 |
| virtual void | SetReadSingleChannelOnly (uint16 channelIndex)=0 |
| virtual void | SetColorConvertOptions (AGMColorProfile *defRGBProfile, AGMColorProfile *defCMYKProfile, bool32 idealizedBlack, bool32 oppBlending, bool32 fastXforms, IGraphicsPort::RenderingIntent defaultRI)=0 |
| virtual void | SetColorConvertOptions (void *opts, IGraphicsPort::RenderingIntent defaultRI)=0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
An interface to create an image manipulation pipeline. The manager is given attributes describing the source and destination images (colorspaces, bit depths, planar/chunky layout, dimensions, etc), and creates a chain of image streams. The image stream chain is an exemplar of the pipe and filter pattern. As an image data consumer reads from the tail of the chain, preceding segments of the pipeline perform transformations required to massage the source data into the required output format.
Basic operation is: create an instance of the stream manager; set attributes describing the source and destinations formats, and set any desired options, profile information, etc.; then query for an image stream that will return image data in the requested destination format.
Most of the methods exposed by the interface set options and should be called before calling QueryImageStream to create the image stream. For instance, if the user specifies kTrue for anti-aliasing, then the ImageStream manager will choose the anti-aliasing segment instead of the downsample segment when the output image dimensions are smaller than the input dimensions.
Resampling type.
Note: these all downsample; we don't support upsampling
| pure virtual |
Returns number of tasks that will take place during the creation of the image stream. This should be called after attributes and other stream creation options have been set and before calling QueryImageStream.
Intended to be used in initializing a progress bar
| pure virtual |
Creates an IImageStream based on specified attributes and options
The image stream is cached, so that subsequent calls without additional changes to the attributes and/or options will return the cached stream.
Note: The colormap in the destination image attributes may be modified during the creation of the image stream. As a result, you should access the colormap after you have queried for the image stream
| pure virtual |
Sets the cache buffer (default is no cache)
Cache must be large enough to hold the output image data
The image stream manager does not take possession of the cache buffer. It is the responsibility of the caller to delete the buffer
| cacheptr | The cache buffer |
| pure virtual |
Provides color conversion options for cases where color conversions are requested.
| defRGBProfile | The default rgb profile to use for uncalibrated rgb. |
| defCMYKProfile | The default cmyk profile to use for uncalibrated rgb. |
| idealizedBlack | If true, uses idealized black conversions from CMYK to RGB/Gray. If false, uses accurate black conversions. |
| oppBlending | If true, uses XYZ-based blending for NChannel->process conversion. If false, blends in destination space. |
| fastXforms | If true, uses faster but less accurate xforms. If false, uses slower but more accurate xforms. |
| pure virtual |
Internal-only direct setting of all color convert options.
| opts | A pointer to the options dictionary container. |
| pure virtual |
Sets destination color profile
| dstAGMColorSpace | Colorspace, assumed to be profile based |
| pure virtual |
Set attributes for destination image. Tells manager how to construct the image stream
| dstImageAttributes | The attributes describing the source image |
| pure virtual |
Sets destination color profile.
It is assumed that either the item contains a profile (i.e. an image with an embedded profile) or if not then its owning document should be used as the container of the profile
If profile information is not provided, then color conversion will be uncalibrated.
| ownerItem | Profile owner |
| pure virtual |
Sets destination color profile
| dstProfile | The profile, specified as an ICMSProfile |
| pure virtual |
Sets whether or not to do diffusion during chunky to indexed conversion. Default is kFalse (no)
| yesno | Boolean: kTrue = do diffusion, kFalse, no diffusion |
| pure virtual |
Sets the first image stream segment. This segment is closest to the source data and serves as the glue tying the source image data to the rest of the image manager pipeline.
| firstImageStreamSegment | The head of the image stream |
| pure virtual |
If converting to 1-bit, use this value to determine if a pixel should be black or white. Default is 128.
| threshold | Threshold for gray |
| pure virtual |
Read a specific alpha channel and strip away all other channels including the color channels.
| channelIndex | Zero based index, where zero refers to the first extra channel after the color channels |
| pure virtual |
Instructs image stream manager to create a stream that reads only a single specific channel and to strip away data for all other channels. Similar to SetReadAlphaChannelOnly, but is not limited to alpha channels. Also, index is absolute and is not relative to color channels.
| channelIndex | Zero based index of channel to read |
| pure virtual |
If downsampling is required, then this determines whether we subsample, downsample (anti-alias), or downsample using a weighted average.
Default is subsampling.
| resample | Resampling type |
| pure virtual |
Sets source color profile
| srcAGMColorSpace | Colorspace, assumed to be profile based |
| pure virtual |
Set attributes for source image. Tells manager how to construct the image stream
| srcImageAttributes | The attributes describing the source image |
| pure virtual |
Sets source color profile
It is assumed that either the item contains a profile (i.e. an image with an embedded profile) or if not then its owning document should be used as the container of the profile
If profile information is not provided, then color conversion will be uncalibrated.
| ownerItem | Profile owner |
| pure virtual |
Sets source color profile
| srcProfile | The profile, specified as an ICMSProfile |
| pure virtual |
When printing separations, the client may be requesting individual planes of data which are represented in gray space. The client can request that the data is presented such that white is zero which may have the effect of inverting the color channel.
If this method is NOT called, then the ImageStreamManager will not touch the planar data.
If this method IS called and the kPMTagPlanarConfig is kPMPlanar, then the ImageStreamManager will look at the destination color space to determine whether or not each channel of data needs to be inverted.
Calling this method does not change the destination IImageAttributes as it is intended to only be used when printing separations.
| yesno | Boolean: kTrue = set white is zero. Default = kFalse |