InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IImageUtils.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Bernd Paradies
6 //
7 // $Author$
8 //
9 // $DateTime$
10 //
11 // $Revision$
12 //
13 // $Change$
14 //
15 // Copyright 1997-2010 Adobe Systems Incorporated. All rights reserved.
16 //
17 // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance
18 // with the terms of the Adobe license agreement accompanying it. If you have received
19 // this file from a source other than Adobe, then your use, modification, or
20 // distribution of it requires the prior written permission of Adobe.
21 //
22 //========================================================================================
23 
24 #ifndef __IImageUtils__
25 #define __IImageUtils__
26 
27 #include "ImageID.h"
28 #include "IPMUnknown.h"
29 #include "IImageAttributes.h"
30 #include "Utils.h"
31 
32 #if MACINTOSH
33 const RsrcID kPCXType = 'PCXC';
34 #else
35 const RsrcID kPCXType = 301;
36 #endif
37 
38 
39 #include "IShape.h"
40 #include "BravoForwardDecl.h"
41 
42 class IPMStream;
43 class ICopyableInMemoryCache;
44 
45 
56 class IImageUtils : public IPMUnknown
57 {
58 public:
59  enum { kDefaultIID = IID_IIMAGEUTILS };
60  enum { kUseFirstAlpha = kMaxUInt32 };
61 
71  virtual bool16 IsEmbeddedImage(const IPMUnknown* boss) = 0;
72 
79  virtual IPMStream *GetImageStream(const UIDRef& imageRef) = 0;
80 
85  virtual uint8* GetPlatformSystemClut(void) = 0;
86 
91  virtual bool16 IsGraphic(const IPMUnknown* boss) = 0;
92 
93 
98  virtual bool16 IsGraphic(const UIDRef& imageRef) = 0;
99 
104  virtual bool16 IsRasterImage(const IPMUnknown* boss) = 0;
105 
110  virtual bool16 IsRasterImage(const UIDRef& imageRef) = 0;
111 
116  virtual bool16 IsVectorGraphic(const IPMUnknown* boss) = 0;
117 
122  virtual bool16 IsVectorGraphic(const UIDRef& imageRef) = 0;
123 
133  virtual void GetDuplicateProxy(const IPMStream& stream, const UIDRef& srcPageItem, UID *dupPageItemUID, UID *dupProxyUID) = 0;
134 
141  virtual AGMColorSpace *GetAGMColorProfileFromImage(UIDRef imageOrProxyRef) = 0;
142 
143 
156  virtual bool16 ITGAlphaExists(const IImageAttributes* iImageAttributes) = 0;
157 
166  virtual uint32 ITGAlphaType(const IImageAttributes* iImageAttributes, uint32 index = kUseFirstAlpha) = 0;
167 
172  virtual uint32 ITGNumberOfChannels(const IImageAttributes* iImageAttributes) = 0;
173 
178  virtual uint32 ITGNumberOfAlphaChannels(const IImageAttributes* iImageAttributes) = 0;
179 
184  virtual uint32 ITGNumberOfSpotChannels(const IImageAttributes* iImageAttributes) = 0;
185 
190  virtual uint32 ITGNumberOfLayers(const IImageAttributes* iImageAttributes) = 0;
191 
197  virtual uint32 ITGGetChannelNames(const IImageAttributes* iImageAttributes, K2Vector<PMString>& channelNames) = 0;
198 
204  virtual uint32 ITGGetChannelTypes(const IImageAttributes* iImageAttributes, K2Vector<uint32>& channelTypes) = 0;
205 
216  virtual ICopyableInMemoryCache* QueryDuplicateCache( const UIDRef& srcPageItem ) = 0;
217 
241  virtual bool32 GetPhotoshopThumbnail(
242  const IImageAttributes *iImageAttributes,
243  uint8* prevBaseaddr,
244  uint32* prevWidth,
245  uint32* prevHeight,
246  bool32 bDoJustify,
247  bool32 bLongAlign = kFalse
248  ) = 0;
249 
257  virtual CAGMColorSpace GetDuotoneColorSpace(IPMUnknown *imageObject) = 0;
258 
268  virtual ErrorCode GetMetaDataOrientation(const UIDRef& uidRef, int16* metaDataOrientation) = 0;
269 
280  virtual ErrorCode GetMetaDataOrientation(IImageAttributes* iImageAttributes, int16* metaDataOrientation) = 0;
281 
300  virtual bool32 RotateThumbnailImage(
301  const IImageAttributes *iImageAttributes,
302  uint8* imageBuffer,
303  int32* imageWidth,
304  int32* imageHeight,
305  const int16 imageChannels,
306  const int16 rotation,
307  const bool32 bDoJustify = kTrue,
308  const bool32 bReorient = kFalse
309  ) = 0;
310 
318  virtual bool16 WriteJPEGToStream(char* data, uint32 width, uint32 height, IPMStream* outStream) = 0;
319 
324  virtual IImageAttributes* QueryImageAttributes(const UIDRef& itemRef) = 0;
325 };
326 
327 
328 #endif // __IImageUtils__