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

#include <IPreflightArtworkImage.h>

Inheritance diagram for IPreflightArtworkImage:
IPMUnknown

Public Types

enum  { kRF_Default = 0, kRF_Alpha = (1L<<0) }
 
enum  { kDefaultIID = IID_IPREFLIGHTARTWORKIMAGE }
 

Public Member Functions

virtual Int32Rect GetBounds () const =0
 
virtual IPreflightArtworkCSInfoQueryColorSpace () const =0
 
virtual const uint8 * GetPixelPtr (int32 channel, int32 x, int32 y) const =0
 
virtual int32 GetPixelIncrement (int32 channel) const =0
 
virtual int32 GetRowIncrement (int32 channel) const =0
 
virtual const uint8 * QueryChunkyScanline (int32 y) const =0
 
virtual void ReleaseChunkyScanline (const uint8 *p) const =0
 
virtual const int32 GetChunkyPixelSize () const =0
 
virtual void SetColorSpace (const InterfacePtr< IPreflightArtworkCSInfo > &iCS)=0
 
virtual void SetBounds (const Int32Rect &b)=0
 
virtual void SetSharedBuffer (void *buf)=0
 
virtual void SetPixelIncrement (int32 inc)=0
 
virtual void SetRowIncrement (int32 inc)=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

This interface provides access to image data provided from mark or group interfaces. In particular, IPreflightArtworkMarkInfo::Rasterize(). This interface sits on a boss pretty much all by itself. Typically it's used to look at a raster version of some object when inspecting the attributes are not sufficient.

See Also
IPreflightArtworkMarkInfo

Member Enumeration Documentation

anonymous enum
Enumerator
kRF_Default 

The default rasterization set: no alpha

kRF_Alpha 

Include an alpha channel in the rasterized image.

Member Function Documentation

virtual Int32Rect IPreflightArtworkImage::GetBounds () const
pure virtual

Get the pixel bounds of the image.

Returns
The pixel bounds of the image.
virtual const int32 IPreflightArtworkImage::GetChunkyPixelSize () const
pure virtual

Obtains the byte size of each pixel; ie the increment by which you should increase the pointer to get to the next pixel.

Returns
The number of bytes between pixel origins.
virtual int32 IPreflightArtworkImage::GetPixelIncrement (int32 channel) const
pure virtual

Get the number of bytes between pixels (in a given row). This along with GetPixelPtr() allows you to walk the pixel data quickly, but you need to be careful to use it properly. In particular you need to use GetPixelIncrement() to know how far to move in a given row and GetRowIncrement() to know how to move to the same pixel in the next/prev row.

Parameters
nThe channel for which you want the increment. In some cases (eg separate alpha) the channel data may be in a completely separate piece of memory with a different row/pixel increment from other channels.
Returns
The number of bytes to add to a pixel pointer to get to the next (x+1) pixel in the same row.
virtual const uint8* IPreflightArtworkImage::GetPixelPtr (int32 channel,
int32 x,
int32 y 
) const
pure virtual

Get a pointer to the image data for a particular pixel.

Parameters
channelIN Which channel you want a pointer to.
xIN The x coordinate in GetBounds() space (note that xMin, xMax can be negative)
yIN The y coordinate in GetBounds() space (note that yMin, yMax can be negative)
Returns
A pointer to the pixel/channel, or nil if any of the parameters are out of bounds.
virtual int32 IPreflightArtworkImage::GetRowIncrement (int32 channel) const
pure virtual

Get the number of bytes between rows. This along with GetPixelPtr() and GetPixelIncrement() allows you to walk the pixel data quickly, but you need to be careful to use it properly. In particular you need to use GetPixelIncrement() to know how far to move in a given row and GetRowIncrement() to know how to move to the same pixel in the next/prev row.

Parameters
nThe channel for which you want the increment. In some cases (eg separate alpha) the channel data may be in a completely separate piece of memory with a different row/pixel increment from other channels.
Returns
The number of bytes to add to a pixel pointer to get to the same pixel in the next (y+1) row.
virtual const uint8* IPreflightArtworkImage::QueryChunkyScanline (int32 y) const
pure virtual

Alternative pixel interface that provides chunky pixels. If you want to look at all of the channels of the data together, chunky is generally easiest, but the generic accessors above support chunky, planar, or a combination, so it's hard to make a compact and efficient algorithm (the general case involves incrementing N pointers for each pixel). The chunky accessors will rearrange pixel data on a scanline basis if necessary in order to provide chunky data. If the data is already chunky then this is a very fast operation; if it's not, it's going to be as least as fast as any chunkifier you would write.

This method obtains a pointer to chunky data for the specified scanline. (And only that scanline; you can't generally go beyond or before this in order to get next/prev rows.)

Parameters
yIN The Y coordinate of the scanline in which you're interested. Must be within the bounds (
See Also
GetBounds).
Returns
A pointer to the chunky scanline data. You need to release this when you're done via
See Also
ReleaseChunkyScanline.
virtual IPreflightArtworkCSInfo* IPreflightArtworkImage::QueryColorSpace () const
pure virtual

Get the colorspace information. You'll need this to get most of the stats about the space, including whether it has alpha, how many channels, which channel is which, etc.

Returns
A refcounted colorspace info interface.
virtual void IPreflightArtworkImage::ReleaseChunkyScanline (const uint8 * p) const
pure virtual

Releases the scanline reserved by QueryChunkyScanline.

Parameters
pIN The scanline you're releasing. After this you should not attempt to access it.
virtual void IPreflightArtworkImage::SetBounds (const Int32Rectb)
pure virtual

Sets the bounds. Internal use only.

Parameters
bIN The bounds.
virtual void IPreflightArtworkImage::SetColorSpace (const InterfacePtr< IPreflightArtworkCSInfo > & iCS)
pure virtual

Sets the colorspace. Internal use only.

Parameters
iCSIN The colorspace.
virtual void IPreflightArtworkImage::SetPixelIncrement (int32 inc)
pure virtual

Sets the pixel increment. Internal use only.

Parameters
incIN The increment.
virtual void IPreflightArtworkImage::SetRowIncrement (int32 inc)
pure virtual

Sets the row increment. Internal use only.

Parameters
incIN The increment.
virtual void IPreflightArtworkImage::SetSharedBuffer (void * buf)
pure virtual

Sets the shared buffer. Internal use only.

Parameters
bufIN The buffer; this is an opaque type, not a memory buffer.