ImageCompression.h
上传用户:xjjlds
上传日期:2015-12-05
资源大小:22823k
文件大小:165k
源码类别:

多媒体编程

开发平台:

Visual C++

  1. EXTERN_API( OSErr )
  2. CDSequenceNewDataSource         (ImageSequence          seqID,
  3.                                  ImageSequenceDataSource * sourceID,
  4.                                  OSType                 sourceType,
  5.                                  long                   sourceInputNumber,
  6.                                  Handle                 dataDescription,
  7.                                  ICMConvertDataFormatUPP  transferProc,
  8.                                  void *                 refCon)                             FOURWORDINLINE(0x203C, 0x001C, 0x0068, 0xAAA3);
  9. EXTERN_API( OSErr )
  10. CDSequenceDisposeDataSource     (ImageSequenceDataSource  sourceID)                         FOURWORDINLINE(0x203C, 0x0004, 0x0069, 0xAAA3);
  11. EXTERN_API( OSErr )
  12. CDSequenceSetSourceData         (ImageSequenceDataSource  sourceID,
  13.                                  void *                 data,
  14.                                  long                   dataSize)                           FOURWORDINLINE(0x203C, 0x000C, 0x006A, 0xAAA3);
  15. EXTERN_API( OSErr )
  16. CDSequenceChangedSourceData     (ImageSequenceDataSource  sourceID)                         FOURWORDINLINE(0x203C, 0x0004, 0x006B, 0xAAA3);
  17. EXTERN_API( OSErr )
  18. CDSequenceSetSourceDataQueue    (ImageSequenceDataSource  sourceID,
  19.                                  QHdrPtr                dataQueue)                          FOURWORDINLINE(0x203C, 0x0008, 0x007B, 0xAAA3);
  20. EXTERN_API( OSErr )
  21. CDSequenceGetDataSource         (ImageSequence          seqID,
  22.                                  ImageSequenceDataSource * sourceID,
  23.                                  OSType                 sourceType,
  24.                                  long                   sourceInputNumber)                  FOURWORDINLINE(0x203C, 0x0010, 0x007F, 0xAAA3);
  25. EXTERN_API( OSErr )
  26. PtInDSequenceData               (ImageSequence          seqID,
  27.                                  void *                 data,
  28.                                  Size                   dataSize,
  29.                                  Point                  where,
  30.                                  Boolean *              hit)                                FOURWORDINLINE(0x203C, 0x0014, 0x006C, 0xAAA3);
  31. EXTERN_API( OSErr )
  32. HitTestDSequenceData            (ImageSequence          seqID,
  33.                                  void *                 data,
  34.                                  Size                   dataSize,
  35.                                  Point                  where,
  36.                                  long *                 hit,
  37.                                  long                   hitFlags)                           FOURWORDINLINE(0x203C, 0x0018, 0x0087, 0xAAA3);
  38. EXTERN_API( OSErr )
  39. GetGraphicsImporterForFile      (const FSSpec *         theFile,
  40.                                  ComponentInstance *    gi)                                 FOURWORDINLINE(0x203C, 0x0008, 0x006E, 0xAAA3);
  41. EXTERN_API( OSErr )
  42. GetGraphicsImporterForDataRef   (Handle                 dataRef,
  43.                                  OSType                 dataRefType,
  44.                                  ComponentInstance *    gi)                                 FOURWORDINLINE(0x203C, 0x000C, 0x0077, 0xAAA3);
  45. enum {
  46.     kDontUseValidateToFindGraphicsImporter = 1L << 0
  47. };
  48. EXTERN_API( OSErr )
  49. GetGraphicsImporterForFileWithFlags (const FSSpec *     theFile,
  50.                                  ComponentInstance *    gi,
  51.                                  long                   flags)                              FOURWORDINLINE(0x203C, 0x000C, 0x0084, 0xAAA3);
  52. EXTERN_API( OSErr )
  53. GetGraphicsImporterForDataRefWithFlags (Handle          dataRef,
  54.                                  OSType                 dataRefType,
  55.                                  ComponentInstance *    gi,
  56.                                  long                   flags)                              FOURWORDINLINE(0x203C, 0x0010, 0x0085, 0xAAA3);
  57. EXTERN_API( OSErr )
  58. QTGetFileNameExtension          (ConstStrFileNameParam  fileName,
  59.                                  OSType                 fileType,
  60.                                  OSType *               extension)                          FOURWORDINLINE(0x203C, 0x000C, 0x0061, 0xAAA3);
  61. EXTERN_API( OSErr )
  62. ImageTranscodeSequenceBegin     (ImageTranscodeSequence * its,
  63.                                  ImageDescriptionHandle  srcDesc,
  64.                                  OSType                 destType,
  65.                                  ImageDescriptionHandle * dstDesc,
  66.                                  void *                 data,
  67.                                  long                   dataSize)                           FOURWORDINLINE(0x203C, 0x0018, 0x006F, 0xAAA3);
  68. EXTERN_API( OSErr )
  69. ImageTranscodeSequenceEnd       (ImageTranscodeSequence  its)                               FOURWORDINLINE(0x203C, 0x0004, 0x0070, 0xAAA3);
  70. EXTERN_API( OSErr )
  71. ImageTranscodeFrame             (ImageTranscodeSequence  its,
  72.                                  void *                 srcData,
  73.                                  long                   srcDataSize,
  74.                                  void **                dstData,
  75.                                  long *                 dstDataSize)                        FOURWORDINLINE(0x203C, 0x0014, 0x0071, 0xAAA3);
  76. EXTERN_API( OSErr )
  77. ImageTranscodeDisposeFrameData  (ImageTranscodeSequence  its,
  78.                                  void *                 dstData)                            FOURWORDINLINE(0x203C, 0x0008, 0x0072, 0xAAA3);
  79. EXTERN_API( OSErr )
  80. CDSequenceInvalidate            (ImageSequence          seqID,
  81.                                  RgnHandle              invalRgn)                           FOURWORDINLINE(0x203C, 0x0008, 0x0073, 0xAAA3);
  82. EXTERN_API( OSErr )
  83. CDSequenceSetTimeBase           (ImageSequence          seqID,
  84.                                  void *                 base)                               FOURWORDINLINE(0x203C, 0x0008, 0x0079, 0xAAA3);
  85. EXTERN_API( OSErr )
  86. ImageFieldSequenceBegin         (ImageFieldSequence *   ifs,
  87.                                  ImageDescriptionHandle  desc1,
  88.                                  ImageDescriptionHandle  desc2,
  89.                                  ImageDescriptionHandle  descOut)                           FOURWORDINLINE(0x203C, 0x0010, 0x006D, 0xAAA3);
  90. EXTERN_API( OSErr )
  91. ImageFieldSequenceExtractCombine (ImageFieldSequence    ifs,
  92.                                  long                   fieldFlags,
  93.                                  void *                 data1,
  94.                                  long                   dataSize1,
  95.                                  void *                 data2,
  96.                                  long                   dataSize2,
  97.                                  void *                 outputData,
  98.                                  long *                 outDataSize)                        FOURWORDINLINE(0x203C, 0x0020, 0x0075, 0xAAA3);
  99. EXTERN_API( OSErr )
  100. ImageFieldSequenceEnd           (ImageFieldSequence     ifs)                                FOURWORDINLINE(0x203C, 0x0004, 0x0076, 0xAAA3);
  101. enum {
  102.     kICMTempThenAppMemory       = 1L << 12,
  103.     kICMAppThenTempMemory       = 1L << 13
  104. };
  105. EXTERN_API( OSErr )
  106. QTNewGWorld                     (GWorldPtr *            offscreenGWorld,
  107.                                  OSType                 PixelFormat,
  108.                                  const Rect *           boundsRect,
  109.                                  CTabHandle             cTable,
  110.                                  GDHandle               aGDevice,
  111.                                  GWorldFlags            flags)                              FOURWORDINLINE(0x203C, 0x0018, 0x0080, 0xAAA3);
  112. EXTERN_API( OSErr )
  113. QTNewGWorldFromPtr              (GWorldPtr *            gw,
  114.                                  OSType                 pixelFormat,
  115.                                  const Rect *           boundsRect,
  116.                                  CTabHandle             cTable,
  117.                                  GDHandle               aGDevice,
  118.                                  GWorldFlags            flags,
  119.                                  void *                 baseAddr,
  120.                                  long                   rowBytes)                           FOURWORDINLINE(0x203C, 0x0020, 0x008B, 0xAAA3);
  121. EXTERN_API( GWorldFlags )
  122. QTUpdateGWorld                  (GWorldPtr *            offscreenGWorld,
  123.                                  OSType                 PixelFormat,
  124.                                  const Rect *           boundsRect,
  125.                                  CTabHandle             cTable,
  126.                                  GDHandle               aGDevice,
  127.                                  GWorldFlags            flags)                              FOURWORDINLINE(0x203C, 0x0018, 0x0081, 0xAAA3);
  128. EXTERN_API( OSErr )
  129. MakeImageDescriptionForPixMap   (PixMapHandle           pixmap,
  130.                                  ImageDescriptionHandle * idh)                              FOURWORDINLINE(0x203C, 0x0008, 0x007A, 0xAAA3);
  131. EXTERN_API( OSErr )
  132. MakeImageDescriptionForEffect   (OSType                 effectType,
  133.                                  ImageDescriptionHandle * idh)                              FOURWORDINLINE(0x203C, 0x0008, 0x0092, 0xAAA3);
  134. EXTERN_API( short )
  135. QTGetPixelSize                  (OSType                 PixelFormat)                        FOURWORDINLINE(0x203C, 0x0004, 0x0086, 0xAAA3);
  136. EXTERN_API( short )
  137. QTGetPixelFormatDepthForImageDescription (OSType        pixelFormat)                        FOURWORDINLINE(0x203C, 0x0004, 0x00A3, 0xAAA3);
  138. EXTERN_API( long )
  139. QTGetPixMapPtrRowBytes          (PixMapPtr              pm)                                 FOURWORDINLINE(0x203C, 0x0004, 0x008D, 0xAAA3);
  140. EXTERN_API( long )
  141. QTGetPixMapHandleRowBytes       (PixMapHandle           pm)                                 FOURWORDINLINE(0x203C, 0x0004, 0x008E, 0xAAA3);
  142. EXTERN_API( OSErr )
  143. QTSetPixMapPtrRowBytes          (PixMapPtr              pm,
  144.                                  long                   rowBytes)                           FOURWORDINLINE(0x203C, 0x0008, 0x0090, 0xAAA3);
  145. EXTERN_API( OSErr )
  146. QTSetPixMapHandleRowBytes       (PixMapHandle           pm,
  147.                                  long                   rowBytes)                           FOURWORDINLINE(0x203C, 0x0008, 0x008F, 0xAAA3);
  148. enum {
  149.     kQTUsePlatformDefaultGammaLevel = 0,                        /* When decompressing into this PixMap, gamma-correct to the platform's standard gamma. */
  150.     kQTUseSourceGammaLevel      = -1L,                          /* When decompressing into this PixMap, don't perform gamma-correction. */
  151.     kQTCCIR601VideoGammaLevel   = 0x00023333                    /* 2.2, standard television video gamma.*/
  152. };
  153. EXTERN_API( Fixed )
  154. QTGetPixMapPtrGammaLevel        (PixMapPtr              pm)                                 FOURWORDINLINE(0x203C, 0x0004, 0x0093, 0xAAA3);
  155. EXTERN_API( OSErr )
  156. QTSetPixMapPtrGammaLevel        (PixMapPtr              pm,
  157.                                  Fixed                  gammaLevel)                         FOURWORDINLINE(0x203C, 0x0008, 0x0094, 0xAAA3);
  158. EXTERN_API( Fixed )
  159. QTGetPixMapHandleGammaLevel     (PixMapHandle           pm)                                 FOURWORDINLINE(0x203C, 0x0004, 0x0096, 0xAAA3);
  160. EXTERN_API( OSErr )
  161. QTSetPixMapHandleGammaLevel     (PixMapHandle           pm,
  162.                                  Fixed                  gammaLevel)                         FOURWORDINLINE(0x203C, 0x0008, 0x0097, 0xAAA3);
  163. EXTERN_API( Fixed )
  164. QTGetPixMapPtrRequestedGammaLevel (PixMapPtr            pm)                                 FOURWORDINLINE(0x203C, 0x0004, 0x0098, 0xAAA3);
  165. EXTERN_API( OSErr )
  166. QTSetPixMapPtrRequestedGammaLevel (PixMapPtr            pm,
  167.                                  Fixed                  requestedGammaLevel)                FOURWORDINLINE(0x203C, 0x0008, 0x0099, 0xAAA3);
  168. EXTERN_API( Fixed )
  169. QTGetPixMapHandleRequestedGammaLevel (PixMapHandle      pm)                                 FOURWORDINLINE(0x203C, 0x0004, 0x009A, 0xAAA3);
  170. EXTERN_API( OSErr )
  171. QTSetPixMapHandleRequestedGammaLevel (PixMapHandle      pm,
  172.                                  Fixed                  requestedGammaLevel)                FOURWORDINLINE(0x203C, 0x0008, 0x009B, 0xAAA3);
  173. EXTERN_API( OSErr )
  174. QuadToQuadMatrix                (const Fixed *          source,
  175.                                  const Fixed *          dest,
  176.                                  MatrixRecord *         map)                                FOURWORDINLINE(0x203C, 0x000C, 0x0095, 0xAAA3);
  177. enum {
  178.     identityMatrixType          = 0x00,                         /* result if matrix is identity */
  179.     translateMatrixType         = 0x01,                         /* result if matrix translates */
  180.     scaleMatrixType             = 0x02,                         /* result if matrix scales */
  181.     scaleTranslateMatrixType    = 0x03,                         /* result if matrix scales and translates */
  182.     linearMatrixType            = 0x04,                         /* result if matrix is general 2 x 2 */
  183.     linearTranslateMatrixType   = 0x05,                         /* result if matrix is general 2 x 2 and translates */
  184.     perspectiveMatrixType       = 0x06                          /* result if matrix is general 3 x 3 */
  185. };
  186. typedef unsigned short                  MatrixFlags;
  187. EXTERN_API( short )
  188. GetMatrixType                   (const MatrixRecord *   m)                                  TWOWORDINLINE(0x7014, 0xABC2);
  189. EXTERN_API( void )
  190. CopyMatrix                      (const MatrixRecord *   m1,
  191.                                  MatrixRecord *         m2)                                 TWOWORDINLINE(0x7020, 0xABC2);
  192. EXTERN_API( Boolean )
  193. EqualMatrix                     (const MatrixRecord *   m1,
  194.                                  const MatrixRecord *   m2)                                 TWOWORDINLINE(0x7021, 0xABC2);
  195. EXTERN_API( void )
  196. SetIdentityMatrix               (MatrixRecord *         matrix)                             TWOWORDINLINE(0x7015, 0xABC2);
  197. EXTERN_API( void )
  198. TranslateMatrix                 (MatrixRecord *         m,
  199.                                  Fixed                  deltaH,
  200.                                  Fixed                  deltaV)                             TWOWORDINLINE(0x7019, 0xABC2);
  201. EXTERN_API( void )
  202. RotateMatrix                    (MatrixRecord *         m,
  203.                                  Fixed                  degrees,
  204.                                  Fixed                  aboutX,
  205.                                  Fixed                  aboutY)                             TWOWORDINLINE(0x7016, 0xABC2);
  206. EXTERN_API( void )
  207. ScaleMatrix                     (MatrixRecord *         m,
  208.                                  Fixed                  scaleX,
  209.                                  Fixed                  scaleY,
  210.                                  Fixed                  aboutX,
  211.                                  Fixed                  aboutY)                             TWOWORDINLINE(0x7017, 0xABC2);
  212. EXTERN_API( void )
  213. SkewMatrix                      (MatrixRecord *         m,
  214.                                  Fixed                  skewX,
  215.                                  Fixed                  skewY,
  216.                                  Fixed                  aboutX,
  217.                                  Fixed                  aboutY)                             TWOWORDINLINE(0x7018, 0xABC2);
  218. EXTERN_API( OSErr )
  219. TransformFixedPoints            (const MatrixRecord *   m,
  220.                                  FixedPoint *           fpt,
  221.                                  long                   count)                              TWOWORDINLINE(0x7022, 0xABC2);
  222. EXTERN_API( OSErr )
  223. TransformPoints                 (const MatrixRecord *   mp,
  224.                                  Point *                pt1,
  225.                                  long                   count)                              TWOWORDINLINE(0x7023, 0xABC2);
  226. EXTERN_API( Boolean )
  227. TransformFixedRect              (const MatrixRecord *   m,
  228.                                  FixedRect *            fr,
  229.                                  FixedPoint *           fpp)                                TWOWORDINLINE(0x7024, 0xABC2);
  230. EXTERN_API( Boolean )
  231. TransformRect                   (const MatrixRecord *   m,
  232.                                  Rect *                 r,
  233.                                  FixedPoint *           fpp)                                TWOWORDINLINE(0x7025, 0xABC2);
  234. EXTERN_API( Boolean )
  235. InverseMatrix                   (const MatrixRecord *   m,
  236.                                  MatrixRecord *         im)                                 TWOWORDINLINE(0x701C, 0xABC2);
  237. EXTERN_API( void )
  238. ConcatMatrix                    (const MatrixRecord *   a,
  239.                                  MatrixRecord *         b)                                  TWOWORDINLINE(0x701B, 0xABC2);
  240. EXTERN_API( void )
  241. RectMatrix                      (MatrixRecord *         matrix,
  242.                                  const Rect *           srcRect,
  243.                                  const Rect *           dstRect)                            TWOWORDINLINE(0x701E, 0xABC2);
  244. EXTERN_API( void )
  245. MapMatrix                       (MatrixRecord *         matrix,
  246.                                  const Rect *           fromRect,
  247.                                  const Rect *           toRect)                             TWOWORDINLINE(0x701D, 0xABC2);
  248. EXTERN_API( void )
  249. CompAdd                         (wide *                 src,
  250.                                  wide *                 dst)                                TWOWORDINLINE(0x7001, 0xABC2);
  251. EXTERN_API( void )
  252. CompSub                         (wide *                 src,
  253.                                  wide *                 dst)                                TWOWORDINLINE(0x7002, 0xABC2);
  254. EXTERN_API( void )
  255. CompNeg                         (wide *                 dst)                                TWOWORDINLINE(0x7003, 0xABC2);
  256. EXTERN_API( void )
  257. CompShift                       (wide *                 src,
  258.                                  short                  shift)                              TWOWORDINLINE(0x7004, 0xABC2);
  259. EXTERN_API( void )
  260. CompMul                         (long                   src1,
  261.                                  long                   src2,
  262.                                  wide *                 dst)                                TWOWORDINLINE(0x7005, 0xABC2);
  263. EXTERN_API( long )
  264. CompDiv                         (wide *                 numerator,
  265.                                  long                   denominator,
  266.                                  long *                 remainder)                          TWOWORDINLINE(0x7006, 0xABC2);
  267. EXTERN_API( void )
  268. CompFixMul                      (wide *                 compSrc,
  269.                                  Fixed                  fixSrc,
  270.                                  wide *                 compDst)                            TWOWORDINLINE(0x7007, 0xABC2);
  271. EXTERN_API( void )
  272. CompMulDiv                      (wide *                 co,
  273.                                  long                   mul,
  274.                                  long                   divisor)                            TWOWORDINLINE(0x7008, 0xABC2);
  275. EXTERN_API( void )
  276. CompMulDivTrunc                 (wide *                 co,
  277.                                  long                   mul,
  278.                                  long                   divisor,
  279.                                  long *                 remainder)                          TWOWORDINLINE(0x700C, 0xABC2);
  280. EXTERN_API( long )
  281. CompCompare                     (const wide *           a,
  282.                                  const wide *           minusb)                             TWOWORDINLINE(0x7009, 0xABC2);
  283. EXTERN_API( unsigned long )
  284. CompSquareRoot                  (const wide *           src)                                TWOWORDINLINE(0x7011, 0xABC2);
  285. EXTERN_API( Fixed )
  286. FixMulDiv                       (Fixed                  src,
  287.                                  Fixed                  mul,
  288.                                  Fixed                  divisor)                            TWOWORDINLINE(0x700A, 0xABC2);
  289. EXTERN_API( Fixed )
  290. UnsignedFixMulDiv               (Fixed                  src,
  291.                                  Fixed                  mul,
  292.                                  Fixed                  divisor)                            TWOWORDINLINE(0x700D, 0xABC2);
  293. EXTERN_API( Fract )
  294. FracSinCos                      (Fixed                  degree,
  295.                                  Fract *                cosOut)                             TWOWORDINLINE(0x700B, 0xABC2);
  296. EXTERN_API( Fixed )
  297. FixExp2                         (Fixed                  src)                                TWOWORDINLINE(0x700E, 0xABC2);
  298. EXTERN_API( Fixed )
  299. FixLog2                         (Fixed                  src)                                TWOWORDINLINE(0x700F, 0xABC2);
  300. EXTERN_API( Fixed )
  301. FixPow                          (Fixed                  base,
  302.                                  Fixed                  exp)                                TWOWORDINLINE(0x7010, 0xABC2);
  303. typedef ComponentInstance               GraphicsImportComponent;
  304. enum {
  305.     GraphicsImporterComponentType = FOUR_CHAR_CODE('grip')
  306. };
  307. enum {
  308.     graphicsImporterUsesImageDecompressor = 1L << 23
  309. };
  310. enum {
  311.     quickTimeImageFileImageDescriptionAtom = FOUR_CHAR_CODE('idsc'),
  312.     quickTimeImageFileImageDataAtom = FOUR_CHAR_CODE('idat'),
  313.     quickTimeImageFileMetaDataAtom = FOUR_CHAR_CODE('meta'),
  314.     quickTimeImageFileColorSyncProfileAtom = FOUR_CHAR_CODE('iicc')
  315. };
  316. enum {
  317.     graphicsImporterDrawsAllPixels = 0,
  318.     graphicsImporterDoesntDrawAllPixels = 1,
  319.     graphicsImporterDontKnowIfDrawAllPixels = 2
  320. };
  321. /* Flags for GraphicsImportSetFlags */
  322. enum {
  323.     kGraphicsImporterDontDoGammaCorrection = 1L << 0,
  324.     kGraphicsImporterTrustResolutionFromFile = 1L << 1,
  325.     kGraphicsImporterEnableSubPixelPositioning = 1L << 2
  326. };
  327. enum {
  328.     kGraphicsExportGroup        = FOUR_CHAR_CODE('expo'),
  329.     kGraphicsExportFileType     = FOUR_CHAR_CODE('ftyp'),
  330.     kGraphicsExportMIMEType     = FOUR_CHAR_CODE('mime'),
  331.     kGraphicsExportExtension    = FOUR_CHAR_CODE('ext '),
  332.     kGraphicsExportDescription  = FOUR_CHAR_CODE('desc')
  333. };
  334. /* User data types for layers of Photoshop files */
  335. enum {
  336.     kQTPhotoshopLayerMode       = FOUR_CHAR_CODE('lmod'),       /* OSType */
  337.     kQTPhotoshopLayerOpacity    = FOUR_CHAR_CODE('lopa'),       /* UInt8, 0 = transparent .. 255 = opaque */
  338.     kQTPhotoshopLayerClipping   = FOUR_CHAR_CODE('lclp'),       /* UInt8, 0 = base, 1 = non-base */
  339.     kQTPhotoshopLayerFlags      = FOUR_CHAR_CODE('lflg'),       /* UInt8 */
  340.     kQTPhotoshopLayerName       = FOUR_CHAR_CODE('﹍nm'),       /* Text */
  341.     kQTPhotoshopLayerUnicodeName = FOUR_CHAR_CODE('luni')       /* Unicode characters, not terminated */
  342. };
  343. /* User data returned by graphics importers to suggest intended use for indexed images */
  344. enum {
  345.     kQTIndexedImageType         = FOUR_CHAR_CODE('nth?'),       /* 1 or more OSTypes, such as the following values: */
  346.     kQTIndexedImageIsThumbnail  = FOUR_CHAR_CODE('n=th'),       /* The image at this index is a thumbnail. */
  347.     kQTIndexedImageIsLayer      = FOUR_CHAR_CODE('n=ly'),       /* The image at this index is a layer. */
  348.     kQTIndexedImageIsPage       = FOUR_CHAR_CODE('n=pg'),       /* The image at this index is a page. */
  349.     kQTIndexedImageIsMultiResolution = FOUR_CHAR_CODE('n=rs')   /* The image at this index is one of several identical images at different resolutions. */
  350. };
  351. /* Other user data types returned by graphics importers */
  352. enum {
  353.     kQTTIFFUserDataPrefix       = 0x74690000,                   /* Added to some tag values in TIFF IFDs to generate user data codes.  (0x7469 is 'ti'.) */
  354.                                                                 /* For example, YCbCrPositioning is tag 0x0213, so its user data code is 0x74690213. */
  355.     kQTTIFFExifUserDataPrefix   = 0x65780000,                   /* Added to tag values in Exif IFDs to generate user data codes.  (0x6578 is 'ex'.) */
  356.                                                                 /* For example, DateTimeOriginal is tag 0x9003, so its user data code is 0x65789003. */
  357.     kQTTIFFExifGPSUserDataPrefix = 0x67700000,                  /* Added to tag values in Exif GPS IFDs to generate user data codes.  (0x6770 is 'gp'.) */
  358.                                                                 /* For example, GPSAltitude is tag 0x0006, so its user data code is 0x6770006. */
  359.     kQTAlphaMode                = FOUR_CHAR_CODE('almo'),       /* UInt32; eg, graphicsModeStraightAlpha or graphicsModePreBlackAlpha */
  360.     kQTAlphaModePreMulColor     = FOUR_CHAR_CODE('almp'),       /* RGBColor; used if kQTAlphaMode is graphicsModePreMulColorAlpha */
  361.     kUserDataIPTC               = FOUR_CHAR_CODE('iptc')
  362. };
  363. /* Found in TIFF and Exif JPEG files */
  364. enum {
  365.     kQTTIFFUserDataOrientation  = 0x74690112,                   /* 1 SHORT */
  366.     kQTTIFFUserDataTransferFunction = 0x7469012D,               /* n SHORTs */
  367.     kQTTIFFUserDataWhitePoint   = 0x7469013E,                   /* 2 RATIONALs */
  368.     kQTTIFFUserDataPrimaryChromaticities = 0x7469013F,          /* 6 RATIONALs */
  369.     kQTTIFFUserDataTransferRange = 0x74690156,                  /* 6 SHORTs */
  370.     kQTTIFFUserDataYCbCrPositioning = 0x74690213,               /* 1 SHORT */
  371.     kQTTIFFUserDataReferenceBlackWhite = 0x74690214             /* n LONGs */
  372. };
  373. /* Found in GeoTIFF files; defined in the GeoTIFF 1.0 spec */
  374. enum {
  375.     kQTTIFFUserDataModelPixelScale = 0x7469830E,                /* 3 DOUBLEs */
  376.     kQTTIFFUserDataModelTransformation = 0x746985D8,            /* 16 DOUBLEs */
  377.     kQTTIFFUserDataModelTiepoint = 0x74698482,                  /* n DOUBLEs */
  378.     kQTTIFFUserDataGeoKeyDirectory = 0x746987AF,                /* n SHORTs */
  379.     kQTTIFFUserDataGeoDoubleParams = 0x746987B0,                /* n DOUBLEs */
  380.     kQTTIFFUserDataGeoAsciiParams = 0x746987B1,                 /* n ASCIIs */
  381.     kQTTIFFUserDataIntergraphMatrix = 0x74698480                /* 16 or 17 DOUBLEs */
  382. };
  383. /* Found in Exif TIFF and Exif JPEG files; defined in the Exif 2.1 spec */
  384. enum {
  385.     kQTExifUserDataExifVersion  = 0x65789000,                   /* 4 bytes (import only) */
  386.     kQTExifUserDataFlashPixVersion = 0x6578A000,                /* 4 bytes */
  387.     kQTExifUserDataColorSpace   = 0x6578A001,                   /* 1 SHORT */
  388.     kQTExifUserDataComponentsConfiguration = 0x65789101,        /* 4 bytes */
  389.     kQTExifUserDataCompressedBitsPerPixel = 0x65789102,         /* 1 RATIONAL */
  390.     kQTExifUserDataPixelXDimension = 0x6578A002,                /* 1 SHORT or LONG */
  391.     kQTExifUserDataPixelYDimension = 0x6578A003,                /* 1 SHORT or LONG */
  392.     kQTExifUserDataMakerNote    = 0x6578927C,                   /* n bytes */
  393.     kQTExifUserDataUserComment  = 0x6578928C,                   /* n bytes */
  394.     kQTExifUserDataRelatedSoundFile = 0x6578A004,               /* 13 ASCIIs*/
  395.     kQTExifUserDataDateTimeOriginal = 0x65789003,               /* 20 ASCIIs */
  396.     kQTExifUserDataDateTimeDigitized = 0x65789004,              /* 20 ASCIIs */
  397.     kQTExifUserDataSubSecTime   = 0x65789290,                   /* n ASCIIs */
  398.     kQTExifUserDataSubSecTimeOriginal = 0x65789291,             /* n ASCIIs */
  399.     kQTExifUserDataSubSecTimeDigitized = 0x65789292,            /* n ASCIIs */
  400.     kQTExifUserDataExposureTime = 0x6578829A,                   /* 1 RATIONAL */
  401.     kQTExifUserDataFNumber      = 0x6578829D,                   /* 1 RATIONAL */
  402.     kQTExifUserDataExposureProgram = 0x65788822,                /* 1 SHORT */
  403.     kQTExifUserDataSpectralSensitivity = 0x65788824,            /* n ASCIIs */
  404.     kQTExifUserDataISOSpeedRatings = 0x65788827,                /* n SHORTs */
  405.     kQTExifUserDataShutterSpeedValue = 0x65789201,              /* 1 SIGNED RATIONAL */
  406.     kQTExifUserDataApertureValue = 0x65789202,                  /* 1 RATIONAL */
  407.     kQTExifUserDataBrightnessValue = 0x65789203,                /* 1 SIGNED RATIONAL */
  408.     kQTExifUserDataExposureBiasValue = 0x65789204,              /* 1 SIGNED RATIONAL */
  409.     kQTExifUserDataMaxApertureValue = 0x65789205,               /* 1 RATIONAL */
  410.     kQTExifUserDataSubjectDistance = 0x65789206,                /* 1 RATIONAL */
  411.     kQTExifUserDataMeteringMode = 0x65789207,                   /* 1 SHORT */
  412.     kQTExifUserDataLightSource  = 0x65789208,                   /* 1 SHORT */
  413.     kQTExifUserDataFlash        = 0x65789209,                   /* 1 SHORT */
  414.     kQTExifUserDataFocalLength  = 0x6578920A,                   /* 1 RATIONAL */
  415.     kQTExifUserDataFlashEnergy  = 0x6578A20B,                   /* 1 RATIONAL */
  416.     kQTExifUserDataFocalPlaneXResolution = 0x6578A20E,          /* 1 RATIONAL */
  417.     kQTExifUserDataFocalPlaneYResolution = 0x6578A20F,          /* 1 RATIONAL */
  418.     kQTExifUserDataFocalPlaneResolutionUnit = 0x6578A210,       /* 1 SHORT */
  419.     kQTExifUserDataSubjectLocation = 0x6578A214,                /* 1 SHORT */
  420.     kQTExifUserDataExposureIndex = 0x6578A215,                  /* 1 RATIONAL */
  421.     kQTExifUserDataSensingMethod = 0x6578A217,                  /* 1 SHORT */
  422.     kQTExifUserDataFileSource   = 0x6578A300,                   /* 1 UNDEFINED */
  423.     kQTExifUserDataSceneType    = 0x6578A301                    /* 1 UNDEFINED */
  424. };
  425. /* Found in some Exif TIFF and Exif JPEG files; defined in the Exif 2.1 spec */
  426. enum {
  427.     kQTExifUserDataGPSVersionID = 0x06770000,                   /* 4 BYTEs */
  428.     kQTExifUserDataGPSLatitudeRef = 0x06770001,                 /* 2 ASCIIs*/
  429.     kQTExifUserDataGPSLatitude  = 0x06770002,                   /* 3 RATIONALs */
  430.     kQTExifUserDataGPSLongitudeRef = 0x06770003,                /* 2 ASCIIs */
  431.     kQTExifUserDataGPSLongitude = 0x06770004,                   /* 3 RATIONALs */
  432.     kQTExifUserDataGPSAltitudeRef = 0x06770005,                 /* 1 BYTE */
  433.     kQTExifUserDataGPSAltitude  = 0x06770006,                   /* 1 RATIONAL */
  434.     kQTExifUserDataGPSTimeStamp = 0x06770007,                   /* 3 RATIONALs */
  435.     kQTExifUserDataGPSSatellites = 0x06770008,                  /* n ASCIIs */
  436.     kQTExifUserDataGPSStatus    = 0x06770009,                   /* 2 ASCIIs */
  437.     kQTExifUserDataGPSMeasureMode = 0x0677000A,                 /* 2 ASCIIs */
  438.     kQTExifUserDataGPSDOP       = 0x0677000B,                   /* 1 RATIONAL */
  439.     kQTExifUserDataGPSSpeedRef  = 0x0677000C,                   /* 2 ASCIIs */
  440.     kQTExifUserDataGPSSpeed     = 0x0677000D,                   /* 1 RATIONAL */
  441.     kQTExifUserDataGPSTrackRef  = 0x0677000E,                   /* 2 ASCIIs */
  442.     kQTExifUserDataGPSTrack     = 0x0677000F,                   /* 1 RATIONAL */
  443.     kQTExifUserDataGPSImgDirectionRef = 0x06770010,             /* 2 ASCIIs */
  444.     kQTExifUserDataGPSImgDirection = 0x06770011,                /* 1 RATIONAL */
  445.     kQTExifUserDataGPSMapDatum  = 0x06770012,                   /* n ASCII */
  446.     kQTExifUserDataGPSDestLatitudeRef = 0x06770013,             /* 2 ASCIIs */
  447.     kQTExifUserDataGPSDestLatitude = 0x06770014,                /* 3 RATIONALs */
  448.     kQTExifUserDataGPSDestLongitudeRef = 0x06770015,            /* 2 ASCIIs */
  449.     kQTExifUserDataGPSDestLongitude = 0x06770016,               /* 3 RATIONALs */
  450.     kQTExifUserDataGPSDestBearingRef = 0x06770017,              /* 2 ASCIIs */
  451.     kQTExifUserDataGPSDestBearing = 0x06770018,                 /* 1 RATIONAL */
  452.     kQTExifUserDataGPSDestDistanceRef = 0x06770019,             /* 2 ASCIIs */
  453.     kQTExifUserDataGPSDestDistance = 0x0677001A                 /* 1 RATIONAL */
  454. };
  455. /** These are GraphicsImport procedures **/
  456. EXTERN_API( ComponentResult )
  457. GraphicsImportSetDataReference  (GraphicsImportComponent  ci,
  458.                                  Handle                 dataRef,
  459.                                  OSType                 dataReType)                         FIVEWORDINLINE(0x2F3C, 0x0008, 0x0001, 0x7000, 0xA82A);
  460. EXTERN_API( ComponentResult )
  461. GraphicsImportGetDataReference  (GraphicsImportComponent  ci,
  462.                                  Handle *               dataRef,
  463.                                  OSType *               dataReType)                         FIVEWORDINLINE(0x2F3C, 0x0008, 0x0002, 0x7000, 0xA82A);
  464. EXTERN_API( ComponentResult )
  465. GraphicsImportSetDataFile       (GraphicsImportComponent  ci,
  466.                                  const FSSpec *         theFile)                            FIVEWORDINLINE(0x2F3C, 0x0004, 0x0003, 0x7000, 0xA82A);
  467. EXTERN_API( ComponentResult )
  468. GraphicsImportGetDataFile       (GraphicsImportComponent  ci,
  469.                                  FSSpec *               theFile)                            FIVEWORDINLINE(0x2F3C, 0x0004, 0x0004, 0x7000, 0xA82A);
  470. EXTERN_API( ComponentResult )
  471. GraphicsImportSetDataHandle     (GraphicsImportComponent  ci,
  472.                                  Handle                 h)                                  FIVEWORDINLINE(0x2F3C, 0x0004, 0x0005, 0x7000, 0xA82A);
  473. EXTERN_API( ComponentResult )
  474. GraphicsImportGetDataHandle     (GraphicsImportComponent  ci,
  475.                                  Handle *               h)                                  FIVEWORDINLINE(0x2F3C, 0x0004, 0x0006, 0x7000, 0xA82A);
  476. EXTERN_API( ComponentResult )
  477. GraphicsImportGetImageDescription (GraphicsImportComponent  ci,
  478.                                  ImageDescriptionHandle * desc)                             FIVEWORDINLINE(0x2F3C, 0x0004, 0x0007, 0x7000, 0xA82A);
  479. EXTERN_API( ComponentResult )
  480. GraphicsImportGetDataOffsetAndSize (GraphicsImportComponent  ci,
  481.                                  unsigned long *        offset,
  482.                                  unsigned long *        size)                               FIVEWORDINLINE(0x2F3C, 0x0008, 0x0008, 0x7000, 0xA82A);
  483. EXTERN_API( ComponentResult )
  484. GraphicsImportReadData          (GraphicsImportComponent  ci,
  485.                                  void *                 dataPtr,
  486.                                  unsigned long          dataOffset,
  487.                                  unsigned long          dataSize)                           FIVEWORDINLINE(0x2F3C, 0x000C, 0x0009, 0x7000, 0xA82A);
  488. EXTERN_API( ComponentResult )
  489. GraphicsImportSetClip           (GraphicsImportComponent  ci,
  490.                                  RgnHandle              clipRgn)                            FIVEWORDINLINE(0x2F3C, 0x0004, 0x000A, 0x7000, 0xA82A);
  491. EXTERN_API( ComponentResult )
  492. GraphicsImportGetClip           (GraphicsImportComponent  ci,
  493.                                  RgnHandle *            clipRgn)                            FIVEWORDINLINE(0x2F3C, 0x0004, 0x000B, 0x7000, 0xA82A);
  494. EXTERN_API( ComponentResult )
  495. GraphicsImportSetSourceRect     (GraphicsImportComponent  ci,
  496.                                  const Rect *           sourceRect)                         FIVEWORDINLINE(0x2F3C, 0x0004, 0x000C, 0x7000, 0xA82A);
  497. EXTERN_API( ComponentResult )
  498. GraphicsImportGetSourceRect     (GraphicsImportComponent  ci,
  499.                                  Rect *                 sourceRect)                         FIVEWORDINLINE(0x2F3C, 0x0004, 0x000D, 0x7000, 0xA82A);
  500. EXTERN_API( ComponentResult )
  501. GraphicsImportGetNaturalBounds  (GraphicsImportComponent  ci,
  502.                                  Rect *                 naturalBounds)                      FIVEWORDINLINE(0x2F3C, 0x0004, 0x000E, 0x7000, 0xA82A);
  503. EXTERN_API( ComponentResult )
  504. GraphicsImportDraw              (GraphicsImportComponent  ci)                               FIVEWORDINLINE(0x2F3C, 0x0000, 0x000F, 0x7000, 0xA82A);
  505. EXTERN_API( ComponentResult )
  506. GraphicsImportSetGWorld         (GraphicsImportComponent  ci,
  507.                                  CGrafPtr               port,
  508.                                  GDHandle               gd)                                 FIVEWORDINLINE(0x2F3C, 0x0008, 0x0010, 0x7000, 0xA82A);
  509. EXTERN_API( ComponentResult )
  510. GraphicsImportGetGWorld         (GraphicsImportComponent  ci,
  511.                                  CGrafPtr *             port,
  512.                                  GDHandle *             gd)                                 FIVEWORDINLINE(0x2F3C, 0x0008, 0x0011, 0x7000, 0xA82A);
  513. EXTERN_API( ComponentResult )
  514. GraphicsImportSetMatrix         (GraphicsImportComponent  ci,
  515.                                  const MatrixRecord *   matrix)                             FIVEWORDINLINE(0x2F3C, 0x0004, 0x0012, 0x7000, 0xA82A);
  516. EXTERN_API( ComponentResult )
  517. GraphicsImportGetMatrix         (GraphicsImportComponent  ci,
  518.                                  MatrixRecord *         matrix)                             FIVEWORDINLINE(0x2F3C, 0x0004, 0x0013, 0x7000, 0xA82A);
  519. EXTERN_API( ComponentResult )
  520. GraphicsImportSetBoundsRect     (GraphicsImportComponent  ci,
  521.                                  const Rect *           bounds)                             FIVEWORDINLINE(0x2F3C, 0x0004, 0x0014, 0x7000, 0xA82A);
  522. EXTERN_API( ComponentResult )
  523. GraphicsImportGetBoundsRect     (GraphicsImportComponent  ci,
  524.                                  Rect *                 bounds)                             FIVEWORDINLINE(0x2F3C, 0x0004, 0x0015, 0x7000, 0xA82A);
  525. EXTERN_API( ComponentResult )
  526. GraphicsImportSaveAsPicture     (GraphicsImportComponent  ci,
  527.                                  const FSSpec *         fss,
  528.                                  ScriptCode             scriptTag)                          FIVEWORDINLINE(0x2F3C, 0x0006, 0x0016, 0x7000, 0xA82A);
  529. EXTERN_API( ComponentResult )
  530. GraphicsImportSetGraphicsMode   (GraphicsImportComponent  ci,
  531.                                  long                   graphicsMode,
  532.                                  const RGBColor *       opColor)                            FIVEWORDINLINE(0x2F3C, 0x0008, 0x0017, 0x7000, 0xA82A);
  533. EXTERN_API( ComponentResult )
  534. GraphicsImportGetGraphicsMode   (GraphicsImportComponent  ci,
  535.                                  long *                 graphicsMode,
  536.                                  RGBColor *             opColor)                            FIVEWORDINLINE(0x2F3C, 0x0008, 0x0018, 0x7000, 0xA82A);
  537. EXTERN_API( ComponentResult )
  538. GraphicsImportSetQuality        (GraphicsImportComponent  ci,
  539.                                  CodecQ                 quality)                            FIVEWORDINLINE(0x2F3C, 0x0004, 0x0019, 0x7000, 0xA82A);
  540. EXTERN_API( ComponentResult )
  541. GraphicsImportGetQuality        (GraphicsImportComponent  ci,
  542.                                  CodecQ *               quality)                            FIVEWORDINLINE(0x2F3C, 0x0004, 0x001A, 0x7000, 0xA82A);
  543. EXTERN_API( ComponentResult )
  544. GraphicsImportSaveAsQuickTimeImageFile (GraphicsImportComponent  ci,
  545.                                  const FSSpec *         fss,
  546.                                  ScriptCode             scriptTag)                          FIVEWORDINLINE(0x2F3C, 0x0006, 0x001B, 0x7000, 0xA82A);
  547. EXTERN_API( ComponentResult )
  548. GraphicsImportSetDataReferenceOffsetAndLimit (GraphicsImportComponent  ci,
  549.                                  unsigned long          offset,
  550.                                  unsigned long          limit)                              FIVEWORDINLINE(0x2F3C, 0x0008, 0x001C, 0x7000, 0xA82A);
  551. EXTERN_API( ComponentResult )
  552. GraphicsImportGetDataReferenceOffsetAndLimit (GraphicsImportComponent  ci,
  553.                                  unsigned long *        offset,
  554.                                  unsigned long *        limit)                              FIVEWORDINLINE(0x2F3C, 0x0008, 0x001D, 0x7000, 0xA82A);
  555. EXTERN_API( ComponentResult )
  556. GraphicsImportGetAliasedDataReference (GraphicsImportComponent  ci,
  557.                                  Handle *               dataRef,
  558.                                  OSType *               dataRefType)                        FIVEWORDINLINE(0x2F3C, 0x0008, 0x001E, 0x7000, 0xA82A);
  559. EXTERN_API( ComponentResult )
  560. GraphicsImportValidate          (GraphicsImportComponent  ci,
  561.                                  Boolean *              valid)                              FIVEWORDINLINE(0x2F3C, 0x0004, 0x001F, 0x7000, 0xA82A);
  562. EXTERN_API( ComponentResult )
  563. GraphicsImportGetMetaData       (GraphicsImportComponent  ci,
  564.                                  void *                 userData)                           FIVEWORDINLINE(0x2F3C, 0x0004, 0x0020, 0x7000, 0xA82A);
  565. EXTERN_API( ComponentResult )
  566. GraphicsImportGetMIMETypeList   (GraphicsImportComponent  ci,
  567.                                  void *                 qtAtomContainerPtr)                 FIVEWORDINLINE(0x2F3C, 0x0004, 0x0021, 0x7000, 0xA82A);
  568. EXTERN_API( ComponentResult )
  569. GraphicsImportDoesDrawAllPixels (GraphicsImportComponent  ci,
  570.                                  short *                drawsAllPixels)                     FIVEWORDINLINE(0x2F3C, 0x0004, 0x0022, 0x7000, 0xA82A);
  571. EXTERN_API( ComponentResult )
  572. GraphicsImportGetAsPicture      (GraphicsImportComponent  ci,
  573.                                  PicHandle *            picture)                            FIVEWORDINLINE(0x2F3C, 0x0004, 0x0023, 0x7000, 0xA82A);
  574. EXTERN_API( ComponentResult )
  575. GraphicsImportExportImageFile   (GraphicsImportComponent  ci,
  576.                                  OSType                 fileType,
  577.                                  OSType                 fileCreator,
  578.                                  const FSSpec *         fss,
  579.                                  ScriptCode             scriptTag)                          FIVEWORDINLINE(0x2F3C, 0x000E, 0x0024, 0x7000, 0xA82A);
  580. EXTERN_API( ComponentResult )
  581. GraphicsImportGetExportImageTypeList (GraphicsImportComponent  ci,
  582.                                  void *                 qtAtomContainerPtr)                 FIVEWORDINLINE(0x2F3C, 0x0004, 0x0025, 0x7000, 0xA82A);
  583. EXTERN_API( ComponentResult )
  584. GraphicsImportDoExportImageFileDialog (GraphicsImportComponent  ci,
  585.                                  const FSSpec *         inDefaultSpec,
  586.                                  StringPtr              prompt,
  587.                                  ModalFilterYDUPP       filterProc,
  588.                                  OSType *               outExportedType,
  589.                                  FSSpec *               outExportedSpec,
  590.                                  ScriptCode *           outScriptTag)                       FIVEWORDINLINE(0x2F3C, 0x0018, 0x0026, 0x7000, 0xA82A);
  591. EXTERN_API( ComponentResult )
  592. GraphicsImportGetExportSettingsAsAtomContainer (GraphicsImportComponent  ci,
  593.                                  void *                 qtAtomContainerPtr)                 FIVEWORDINLINE(0x2F3C, 0x0004, 0x0027, 0x7000, 0xA82A);
  594. EXTERN_API( ComponentResult )
  595. GraphicsImportSetExportSettingsFromAtomContainer (GraphicsImportComponent  ci,
  596.                                  void *                 qtAtomContainer)                    FIVEWORDINLINE(0x2F3C, 0x0004, 0x0028, 0x7000, 0xA82A);
  597. EXTERN_API( ComponentResult )
  598. GraphicsImportSetProgressProc   (GraphicsImportComponent  ci,
  599.                                  ICMProgressProcRecordPtr  progressProc)                    FIVEWORDINLINE(0x2F3C, 0x0004, 0x0029, 0x7000, 0xA82A);
  600. EXTERN_API( ComponentResult )
  601. GraphicsImportGetProgressProc   (GraphicsImportComponent  ci,
  602.                                  ICMProgressProcRecordPtr  progressProc)                    FIVEWORDINLINE(0x2F3C, 0x0004, 0x002A, 0x7000, 0xA82A);
  603. EXTERN_API( ComponentResult )
  604. GraphicsImportGetImageCount     (GraphicsImportComponent  ci,
  605.                                  unsigned long *        imageCount)                         FIVEWORDINLINE(0x2F3C, 0x0004, 0x002B, 0x7000, 0xA82A);
  606. EXTERN_API( ComponentResult )
  607. GraphicsImportSetImageIndex     (GraphicsImportComponent  ci,
  608.                                  unsigned long          imageIndex)                         FIVEWORDINLINE(0x2F3C, 0x0004, 0x002C, 0x7000, 0xA82A);
  609. EXTERN_API( ComponentResult )
  610. GraphicsImportGetImageIndex     (GraphicsImportComponent  ci,
  611.                                  unsigned long *        imageIndex)                         FIVEWORDINLINE(0x2F3C, 0x0004, 0x002D, 0x7000, 0xA82A);
  612. EXTERN_API( ComponentResult )
  613. GraphicsImportGetDataOffsetAndSize64 (GraphicsImportComponent  ci,
  614.                                  wide *                 offset,
  615.                                  wide *                 size)                               FIVEWORDINLINE(0x2F3C, 0x0008, 0x002E, 0x7000, 0xA82A);
  616. EXTERN_API( ComponentResult )
  617. GraphicsImportReadData64        (GraphicsImportComponent  ci,
  618.                                  void *                 dataPtr,
  619.                                  const wide *           dataOffset,
  620.                                  unsigned long          dataSize)                           FIVEWORDINLINE(0x2F3C, 0x000C, 0x002F, 0x7000, 0xA82A);
  621. EXTERN_API( ComponentResult )
  622. GraphicsImportSetDataReferenceOffsetAndLimit64 (GraphicsImportComponent  ci,
  623.                                  const wide *           offset,
  624.                                  const wide *           limit)                              FIVEWORDINLINE(0x2F3C, 0x0008, 0x0030, 0x7000, 0xA82A);
  625. EXTERN_API( ComponentResult )
  626. GraphicsImportGetDataReferenceOffsetAndLimit64 (GraphicsImportComponent  ci,
  627.                                  wide *                 offset,
  628.                                  wide *                 limit)                              FIVEWORDINLINE(0x2F3C, 0x0008, 0x0031, 0x7000, 0xA82A);
  629. EXTERN_API( ComponentResult )
  630. GraphicsImportGetDefaultMatrix  (GraphicsImportComponent  ci,
  631.                                  MatrixRecord *         defaultMatrix)                      FIVEWORDINLINE(0x2F3C, 0x0004, 0x0032, 0x7000, 0xA82A);
  632. EXTERN_API( ComponentResult )
  633. GraphicsImportGetDefaultClip    (GraphicsImportComponent  ci,
  634.                                  RgnHandle *            defaultRgn)                         FIVEWORDINLINE(0x2F3C, 0x0004, 0x0033, 0x7000, 0xA82A);
  635. EXTERN_API( ComponentResult )
  636. GraphicsImportGetDefaultGraphicsMode (GraphicsImportComponent  ci,
  637.                                  long *                 defaultGraphicsMode,
  638.                                  RGBColor *             defaultOpColor)                     FIVEWORDINLINE(0x2F3C, 0x0008, 0x0034, 0x7000, 0xA82A);
  639. EXTERN_API( ComponentResult )
  640. GraphicsImportGetDefaultSourceRect (GraphicsImportComponent  ci,
  641.                                  Rect *                 defaultSourceRect)                  FIVEWORDINLINE(0x2F3C, 0x0004, 0x0035, 0x7000, 0xA82A);
  642. EXTERN_API( ComponentResult )
  643. GraphicsImportGetColorSyncProfile (GraphicsImportComponent  ci,
  644.                                  Handle *               profile)                            FIVEWORDINLINE(0x2F3C, 0x0004, 0x0036, 0x7000, 0xA82A);
  645. EXTERN_API( ComponentResult )
  646. GraphicsImportSetDestRect       (GraphicsImportComponent  ci,
  647.                                  const Rect *           destRect)                           FIVEWORDINLINE(0x2F3C, 0x0004, 0x0037, 0x7000, 0xA82A);
  648. EXTERN_API( ComponentResult )
  649. GraphicsImportGetDestRect       (GraphicsImportComponent  ci,
  650.                                  Rect *                 destRect)                           FIVEWORDINLINE(0x2F3C, 0x0004, 0x0038, 0x7000, 0xA82A);
  651. EXTERN_API( ComponentResult )
  652. GraphicsImportSetFlags          (GraphicsImportComponent  ci,
  653.                                  long                   flags)                              FIVEWORDINLINE(0x2F3C, 0x0004, 0x0039, 0x7000, 0xA82A);
  654. EXTERN_API( ComponentResult )
  655. GraphicsImportGetFlags          (GraphicsImportComponent  ci,
  656.                                  long *                 flags)                              FIVEWORDINLINE(0x2F3C, 0x0004, 0x003A, 0x7000, 0xA82A);
  657. /* 2 private selectors */
  658. EXTERN_API( ComponentResult )
  659. GraphicsImportGetBaseDataOffsetAndSize64 (GraphicsImportComponent  ci,
  660.                                  wide *                 offset,
  661.                                  wide *                 size)                               FIVEWORDINLINE(0x2F3C, 0x0008, 0x003D, 0x7000, 0xA82A);
  662. EXTERN_API( ComponentResult )
  663. GraphicsImportSetImageIndexToThumbnail (GraphicsImportComponent  ci)                        FIVEWORDINLINE(0x2F3C, 0x0000, 0x003E, 0x7000, 0xA82A);
  664. typedef ComponentInstance               GraphicsExportComponent;
  665. enum {
  666.     GraphicsExporterComponentType = FOUR_CHAR_CODE('grex'),
  667.     kBaseGraphicsExporterSubType = FOUR_CHAR_CODE('base')
  668. };
  669. enum {
  670.     graphicsExporterIsBaseExporter = 1L << 0,
  671.     graphicsExporterCanTranscode = 1L << 1,
  672.     graphicsExporterUsesImageCompressor = 1L << 2
  673. };
  674. struct QTResolutionSettings {
  675.     Fixed                           horizontalResolution;
  676.     Fixed                           verticalResolution;
  677. };
  678. typedef struct QTResolutionSettings     QTResolutionSettings;
  679. struct QTTargetDataSize {
  680.     unsigned long                   targetDataSize;
  681. };
  682. typedef struct QTTargetDataSize         QTTargetDataSize;
  683. struct QTThumbnailSettings {
  684.     long                            enableThumbnail;            /* a thoroughly padded Boolean*/
  685.     long                            maxThumbnailWidth;          /* set to zero to let someone else decide*/
  686.     long                            maxThumbnailHeight;         /* set to zero to let someone else decide*/
  687. };
  688. typedef struct QTThumbnailSettings      QTThumbnailSettings;
  689. enum {
  690.     kQTResolutionSettings       = FOUR_CHAR_CODE('reso'),
  691.     kQTTargetDataSize           = FOUR_CHAR_CODE('dasz'),
  692.     kQTDontRecompress           = FOUR_CHAR_CODE('dntr'),
  693.     kQTInterlaceStyle           = FOUR_CHAR_CODE('ilac'),
  694.     kQTColorSyncProfile         = FOUR_CHAR_CODE('iccp'),
  695.     kQTThumbnailSettings        = FOUR_CHAR_CODE('thum'),
  696.     kQTEnableExif               = FOUR_CHAR_CODE('exif'),       /* UInt8 (boolean)*/
  697.     kQTMetaData                 = FOUR_CHAR_CODE('meta')
  698. };
  699. enum {
  700.     kQTTIFFCompressionMethod    = FOUR_CHAR_CODE('tifc'),       /* UInt32*/
  701.     kQTTIFFCompression_None     = 1,
  702.     kQTTIFFCompression_PackBits = 32773L,
  703.     kQTTIFFLittleEndian         = FOUR_CHAR_CODE('tife')        /* UInt8 (boolean)*/
  704. };
  705. enum {
  706.     kQTPNGFilterPreference      = FOUR_CHAR_CODE('pngf'),       /* UInt32*/
  707.     kQTPNGFilterBestForColorType = FOUR_CHAR_CODE('bflt'),
  708.     kQTPNGFilterNone            = 0,
  709.     kQTPNGFilterSub             = 1,
  710.     kQTPNGFilterUp              = 2,
  711.     kQTPNGFilterAverage         = 3,
  712.     kQTPNGFilterPaeth           = 4,
  713.     kQTPNGFilterAdaptivePerRow  = FOUR_CHAR_CODE('aflt'),
  714.     kQTPNGInterlaceStyle        = FOUR_CHAR_CODE('ilac'),       /* UInt32*/
  715.     kQTPNGInterlaceNone         = 0,
  716.     kQTPNGInterlaceAdam7        = 1
  717. };
  718. /** These are GraphicsExport procedures **/
  719. /* To use: set the input and output (and other settings as desired) and call GEDoExport. */
  720. EXTERN_API( ComponentResult )
  721. GraphicsExportDoExport          (GraphicsExportComponent  ci,
  722.                                  unsigned long *        actualSizeWritten)                  FIVEWORDINLINE(0x2F3C, 0x0004, 0x0001, 0x7000, 0xA82A);
  723. /* Used for internal communication between the base and format-specific graphics exporter: */
  724. EXTERN_API( ComponentResult )
  725. GraphicsExportCanTranscode      (GraphicsExportComponent  ci,
  726.                                  Boolean *              canTranscode)                       FIVEWORDINLINE(0x2F3C, 0x0004, 0x0002, 0x7000, 0xA82A);
  727. EXTERN_API( ComponentResult )
  728. GraphicsExportDoTranscode       (GraphicsExportComponent  ci)                               FIVEWORDINLINE(0x2F3C, 0x0000, 0x0003, 0x7000, 0xA82A);
  729. EXTERN_API( ComponentResult )
  730. GraphicsExportCanUseCompressor  (GraphicsExportComponent  ci,
  731.                                  Boolean *              canUseCompressor,
  732.                                  void *                 codecSettingsAtomContainerPtr)      FIVEWORDINLINE(0x2F3C, 0x0008, 0x0004, 0x7000, 0xA82A);
  733. EXTERN_API( ComponentResult )
  734. GraphicsExportDoUseCompressor   (GraphicsExportComponent  ci,
  735.                                  void *                 codecSettingsAtomContainer,
  736.                                  ImageDescriptionHandle * outDesc)                          FIVEWORDINLINE(0x2F3C, 0x0008, 0x0005, 0x7000, 0xA82A);
  737. EXTERN_API( ComponentResult )
  738. GraphicsExportDoStandaloneExport (GraphicsExportComponent  ci)                              FIVEWORDINLINE(0x2F3C, 0x0000, 0x0006, 0x7000, 0xA82A);
  739. /* Queries applications can make of a format-specific graphics exporter: */
  740. EXTERN_API( ComponentResult )
  741. GraphicsExportGetDefaultFileTypeAndCreator (GraphicsExportComponent  ci,
  742.                                  OSType *               fileType,
  743.                                  OSType *               fileCreator)                        FIVEWORDINLINE(0x2F3C, 0x0008, 0x0007, 0x7000, 0xA82A);
  744. EXTERN_API( ComponentResult )
  745. GraphicsExportGetDefaultFileNameExtension (GraphicsExportComponent  ci,
  746.                                  OSType *               fileNameExtension)                  FIVEWORDINLINE(0x2F3C, 0x0004, 0x0008, 0x7000, 0xA82A);
  747. EXTERN_API( ComponentResult )
  748. GraphicsExportGetMIMETypeList   (GraphicsExportComponent  ci,
  749.                                  void *                 qtAtomContainerPtr)                 FIVEWORDINLINE(0x2F3C, 0x0004, 0x0009, 0x7000, 0xA82A);
  750. /* (1 unused selector) */
  751. /* Graphics exporter settings: */
  752. EXTERN_API( ComponentResult )
  753. GraphicsExportRequestSettings   (GraphicsExportComponent  ci,
  754.                                  ModalFilterYDUPP       filterProc,
  755.                                  void *                 yourDataProc)                       FIVEWORDINLINE(0x2F3C, 0x0008, 0x000B, 0x7000, 0xA82A);
  756. EXTERN_API( ComponentResult )
  757. GraphicsExportSetSettingsFromAtomContainer (GraphicsExportComponent  ci,
  758.                                  void *                 qtAtomContainer)                    FIVEWORDINLINE(0x2F3C, 0x0004, 0x000C, 0x7000, 0xA82A);
  759. EXTERN_API( ComponentResult )
  760. GraphicsExportGetSettingsAsAtomContainer (GraphicsExportComponent  ci,
  761.                                  void *                 qtAtomContainerPtr)                 FIVEWORDINLINE(0x2F3C, 0x0004, 0x000D, 0x7000, 0xA82A);
  762. EXTERN_API( ComponentResult )
  763. GraphicsExportGetSettingsAsText (GraphicsExportComponent  ci,
  764.                                  Handle *               theText)                            FIVEWORDINLINE(0x2F3C, 0x0004, 0x000E, 0x7000, 0xA82A);
  765. /* Graphics exporters may implement some or none of the following: */
  766. EXTERN_API( ComponentResult )
  767. GraphicsExportSetDontRecompress (GraphicsExportComponent  ci,
  768.                                  Boolean                dontRecompress)                     FIVEWORDINLINE(0x2F3C, 0x0002, 0x000F, 0x7000, 0xA82A);
  769. EXTERN_API( ComponentResult )
  770. GraphicsExportGetDontRecompress (GraphicsExportComponent  ci,
  771.                                  Boolean *              dontRecompress)                     FIVEWORDINLINE(0x2F3C, 0x0004, 0x0010, 0x7000, 0xA82A);
  772. EXTERN_API( ComponentResult )
  773. GraphicsExportSetInterlaceStyle (GraphicsExportComponent  ci,
  774.                                  unsigned long          interlaceStyle)                     FIVEWORDINLINE(0x2F3C, 0x0004, 0x0011, 0x7000, 0xA82A);
  775. EXTERN_API( ComponentResult )
  776. GraphicsExportGetInterlaceStyle (GraphicsExportComponent  ci,
  777.                                  unsigned long *        interlaceStyle)                     FIVEWORDINLINE(0x2F3C, 0x0004, 0x0012, 0x7000, 0xA82A);
  778. EXTERN_API( ComponentResult )
  779. GraphicsExportSetMetaData       (GraphicsExportComponent  ci,
  780.                                  void *                 userData)                           FIVEWORDINLINE(0x2F3C, 0x0004, 0x0013, 0x7000, 0xA82A);
  781. EXTERN_API( ComponentResult )
  782. GraphicsExportGetMetaData       (GraphicsExportComponent  ci,
  783.                                  void *                 userData)                           FIVEWORDINLINE(0x2F3C, 0x0004, 0x0014, 0x7000, 0xA82A);
  784. EXTERN_API( ComponentResult )
  785. GraphicsExportSetTargetDataSize (GraphicsExportComponent  ci,
  786.                                  unsigned long          targetDataSize)                     FIVEWORDINLINE(0x2F3C, 0x0004, 0x0015, 0x7000, 0xA82A);
  787. EXTERN_API( ComponentResult )
  788. GraphicsExportGetTargetDataSize (GraphicsExportComponent  ci,
  789.                                  unsigned long *        targetDataSize)                     FIVEWORDINLINE(0x2F3C, 0x0004, 0x0016, 0x7000, 0xA82A);
  790. EXTERN_API( ComponentResult )
  791. GraphicsExportSetCompressionMethod (GraphicsExportComponent  ci,
  792.                                  long                   compressionMethod)                  FIVEWORDINLINE(0x2F3C, 0x0004, 0x0017, 0x7000, 0xA82A);
  793. EXTERN_API( ComponentResult )
  794. GraphicsExportGetCompressionMethod (GraphicsExportComponent  ci,
  795.                                  long *                 compressionMethod)                  FIVEWORDINLINE(0x2F3C, 0x0004, 0x0018, 0x7000, 0xA82A);
  796. EXTERN_API( ComponentResult )
  797. GraphicsExportSetCompressionQuality (GraphicsExportComponent  ci,
  798.                                  CodecQ                 spatialQuality)                     FIVEWORDINLINE(0x2F3C, 0x0004, 0x0019, 0x7000, 0xA82A);
  799. EXTERN_API( ComponentResult )
  800. GraphicsExportGetCompressionQuality (GraphicsExportComponent  ci,
  801.                                  CodecQ *               spatialQuality)                     FIVEWORDINLINE(0x2F3C, 0x0004, 0x001A, 0x7000, 0xA82A);
  802. EXTERN_API( ComponentResult )
  803. GraphicsExportSetResolution     (GraphicsExportComponent  ci,
  804.                                  Fixed                  horizontalResolution,
  805.                                  Fixed                  verticalResolution)                 FIVEWORDINLINE(0x2F3C, 0x0008, 0x001B, 0x7000, 0xA82A);
  806. EXTERN_API( ComponentResult )
  807. GraphicsExportGetResolution     (GraphicsExportComponent  ci,
  808.                                  Fixed *                horizontalResolution,
  809.                                  Fixed *                verticalResolution)                 FIVEWORDINLINE(0x2F3C, 0x0008, 0x001C, 0x7000, 0xA82A);
  810. EXTERN_API( ComponentResult )
  811. GraphicsExportSetDepth          (GraphicsExportComponent  ci,
  812.                                  long                   depth)                              FIVEWORDINLINE(0x2F3C, 0x0004, 0x001D, 0x7000, 0xA82A);
  813. EXTERN_API( ComponentResult )
  814. GraphicsExportGetDepth          (GraphicsExportComponent  ci,
  815.                                  long *                 depth)                              FIVEWORDINLINE(0x2F3C, 0x0004, 0x001E, 0x7000, 0xA82A);
  816. /* (2 unused selectors) */
  817. EXTERN_API( ComponentResult )
  818. GraphicsExportSetColorSyncProfile (GraphicsExportComponent  ci,
  819.                                  Handle                 colorSyncProfile)                   FIVEWORDINLINE(0x2F3C, 0x0004, 0x0021, 0x7000, 0xA82A);
  820. EXTERN_API( ComponentResult )
  821. GraphicsExportGetColorSyncProfile (GraphicsExportComponent  ci,
  822.                                  Handle *               colorSyncProfile)                   FIVEWORDINLINE(0x2F3C, 0x0004, 0x0022, 0x7000, 0xA82A);
  823. /* Always implemented by the base graphics exporter: */
  824. EXTERN_API( ComponentResult )
  825. GraphicsExportSetProgressProc   (GraphicsExportComponent  ci,
  826.                                  ICMProgressProcRecordPtr  progressProc)                    FIVEWORDINLINE(0x2F3C, 0x0004, 0x0023, 0x7000, 0xA82A);
  827. EXTERN_API( ComponentResult )
  828. GraphicsExportGetProgressProc   (GraphicsExportComponent  ci,
  829.                                  ICMProgressProcRecordPtr  progressProc)                    FIVEWORDINLINE(0x2F3C, 0x0004, 0x0024, 0x7000, 0xA82A);
  830. /* Sources for the input image: */
  831. EXTERN_API( ComponentResult )
  832. GraphicsExportSetInputDataReference (GraphicsExportComponent  ci,
  833.                                  Handle                 dataRef,
  834.                                  OSType                 dataRefType,
  835.                                  ImageDescriptionHandle  desc)                              FIVEWORDINLINE(0x2F3C, 0x000C, 0x0025, 0x7000, 0xA82A);
  836. EXTERN_API( ComponentResult )
  837. GraphicsExportGetInputDataReference (GraphicsExportComponent  ci,
  838.                                  Handle *               dataRef,
  839.                                  OSType *               dataRefType)                        FIVEWORDINLINE(0x2F3C, 0x0008, 0x0026, 0x7000, 0xA82A);
  840. EXTERN_API( ComponentResult )
  841. GraphicsExportSetInputFile      (GraphicsExportComponent  ci,
  842.                                  const FSSpec *         theFile,
  843.                                  ImageDescriptionHandle  desc)                              FIVEWORDINLINE(0x2F3C, 0x0008, 0x0027, 0x7000, 0xA82A);
  844. EXTERN_API( ComponentResult )
  845. GraphicsExportGetInputFile      (GraphicsExportComponent  ci,
  846.                                  FSSpec *               theFile)                            FIVEWORDINLINE(0x2F3C, 0x0004, 0x0028, 0x7000, 0xA82A);
  847. EXTERN_API( ComponentResult )
  848. GraphicsExportSetInputHandle    (GraphicsExportComponent  ci,
  849.                                  Handle                 h,
  850.                                  ImageDescriptionHandle  desc)                              FIVEWORDINLINE(0x2F3C, 0x0008, 0x0029, 0x7000, 0xA82A);
  851. EXTERN_API( ComponentResult )
  852. GraphicsExportGetInputHandle    (GraphicsExportComponent  ci,
  853.                                  Handle *               h)                                  FIVEWORDINLINE(0x2F3C, 0x0004, 0x002A, 0x7000, 0xA82A);
  854. EXTERN_API( ComponentResult )
  855. GraphicsExportSetInputPtr       (GraphicsExportComponent  ci,
  856.                                  Ptr                    p,
  857.                                  unsigned long          size,
  858.                                  ImageDescriptionHandle  desc)                              FIVEWORDINLINE(0x2F3C, 0x000C, 0x002B, 0x7000, 0xA82A);
  859. EXTERN_API( ComponentResult )
  860. GraphicsExportGetInputPtr       (GraphicsExportComponent  ci,
  861.                                  Ptr *                  p,
  862.                                  unsigned long *        size)                               FIVEWORDINLINE(0x2F3C, 0x0008, 0x002C, 0x7000, 0xA82A);
  863. EXTERN_API( ComponentResult )
  864. GraphicsExportSetInputGraphicsImporter (GraphicsExportComponent  ci,
  865.                                  GraphicsImportComponent  grip)                             FIVEWORDINLINE(0x2F3C, 0x0004, 0x002D, 0x7000, 0xA82A);
  866. EXTERN_API( ComponentResult )
  867. GraphicsExportGetInputGraphicsImporter (GraphicsExportComponent  ci,
  868.                                  GraphicsImportComponent * grip)                            FIVEWORDINLINE(0x2F3C, 0x0004, 0x002E, 0x7000, 0xA82A);
  869. EXTERN_API( ComponentResult )
  870. GraphicsExportSetInputPicture   (GraphicsExportComponent  ci,
  871.                                  PicHandle              picture)                            FIVEWORDINLINE(0x2F3C, 0x0004, 0x002F, 0x7000, 0xA82A);
  872. EXTERN_API( ComponentResult )
  873. GraphicsExportGetInputPicture   (GraphicsExportComponent  ci,
  874.                                  PicHandle *            picture)                            FIVEWORDINLINE(0x2F3C, 0x0004, 0x0030, 0x7000, 0xA82A);
  875. EXTERN_API( ComponentResult )
  876. GraphicsExportSetInputGWorld    (GraphicsExportComponent  ci,
  877.                                  GWorldPtr              gworld)                             FIVEWORDINLINE(0x2F3C, 0x0004, 0x0031, 0x7000, 0xA82A);
  878. EXTERN_API( ComponentResult )
  879. GraphicsExportGetInputGWorld    (GraphicsExportComponent  ci,
  880.                                  GWorldPtr *            gworld)                             FIVEWORDINLINE(0x2F3C, 0x0004, 0x0032, 0x7000, 0xA82A);
  881. EXTERN_API( ComponentResult )
  882. GraphicsExportSetInputPixmap    (GraphicsExportComponent  ci,
  883.                                  PixMapHandle           pixmap)                             FIVEWORDINLINE(0x2F3C, 0x0004, 0x0033, 0x7000, 0xA82A);
  884. EXTERN_API( ComponentResult )
  885. GraphicsExportGetInputPixmap    (GraphicsExportComponent  ci,
  886.                                  PixMapHandle *         pixmap)                             FIVEWORDINLINE(0x2F3C, 0x0004, 0x0034, 0x7000, 0xA82A);
  887. /* Only applicable when the input is a data reference, file, handle or ptr: */
  888. EXTERN_API( ComponentResult )
  889. GraphicsExportSetInputOffsetAndLimit (GraphicsExportComponent  ci,
  890.                                  unsigned long          offset,
  891.                                  unsigned long          limit)                              FIVEWORDINLINE(0x2F3C, 0x0008, 0x0035, 0x7000, 0xA82A);
  892. EXTERN_API( ComponentResult )
  893. GraphicsExportGetInputOffsetAndLimit (GraphicsExportComponent  ci,
  894.                                  unsigned long *        offset,
  895.                                  unsigned long *        limit)                              FIVEWORDINLINE(0x2F3C, 0x0008, 0x0036, 0x7000, 0xA82A);
  896. /* Used by format-specific graphics exporters when transcoding: */
  897. EXTERN_API( ComponentResult )
  898. GraphicsExportMayExporterReadInputData (GraphicsExportComponent  ci,
  899.                                  Boolean *              mayReadInputData)                   FIVEWORDINLINE(0x2F3C, 0x0004, 0x0037, 0x7000, 0xA82A);
  900. EXTERN_API( ComponentResult )
  901. GraphicsExportGetInputDataSize  (GraphicsExportComponent  ci,
  902.                                  unsigned long *        size)                               FIVEWORDINLINE(0x2F3C, 0x0004, 0x0038, 0x7000, 0xA82A);
  903. EXTERN_API( ComponentResult )
  904. GraphicsExportReadInputData     (GraphicsExportComponent  ci,
  905.                                  void *                 dataPtr,
  906.                                  unsigned long          dataOffset,
  907.                                  unsigned long          dataSize)                           FIVEWORDINLINE(0x2F3C, 0x000C, 0x0039, 0x7000, 0xA82A);
  908. /* Used by format-specific graphics exporters, especially when doing standalone export: */
  909. EXTERN_API( ComponentResult )
  910. GraphicsExportGetInputImageDescription (GraphicsExportComponent  ci,
  911.                                  ImageDescriptionHandle * desc)                             FIVEWORDINLINE(0x2F3C, 0x0004, 0x003A, 0x7000, 0xA82A);
  912. EXTERN_API( ComponentResult )
  913. GraphicsExportGetInputImageDimensions (GraphicsExportComponent  ci,
  914.                                  Rect *                 dimensions)                         FIVEWORDINLINE(0x2F3C, 0x0004, 0x003B, 0x7000, 0xA82A);
  915. EXTERN_API( ComponentResult )
  916. GraphicsExportGetInputImageDepth (GraphicsExportComponent  ci,
  917.                                  long *                 inputDepth)                         FIVEWORDINLINE(0x2F3C, 0x0004, 0x003C, 0x7000, 0xA82A);
  918. EXTERN_API( ComponentResult )
  919. GraphicsExportDrawInputImage    (GraphicsExportComponent  ci,
  920.                                  CGrafPtr               gw,
  921.                                  GDHandle               gd,
  922.                                  const Rect *           srcRect,
  923.                                  const Rect *           dstRect)                            FIVEWORDINLINE(0x2F3C, 0x0010, 0x003D, 0x7000, 0xA82A);
  924. /* Destinations for the output image: */
  925. EXTERN_API( ComponentResult )
  926. GraphicsExportSetOutputDataReference (GraphicsExportComponent  ci,
  927.                                  Handle                 dataRef,
  928.                                  OSType                 dataRefType)                        FIVEWORDINLINE(0x2F3C, 0x0008, 0x003E, 0x7000, 0xA82A);
  929. EXTERN_API( ComponentResult )
  930. GraphicsExportGetOutputDataReference (GraphicsExportComponent  ci,
  931.                                  Handle *               dataRef,
  932.                                  OSType *               dataRefType)                        FIVEWORDINLINE(0x2F3C, 0x0008, 0x003F, 0x7000, 0xA82A);
  933. EXTERN_API( ComponentResult )
  934. GraphicsExportSetOutputFile     (GraphicsExportComponent  ci,
  935.                                  const FSSpec *         theFile)                            FIVEWORDINLINE(0x2F3C, 0x0004, 0x0040, 0x7000, 0xA82A);
  936. EXTERN_API( ComponentResult )
  937. GraphicsExportGetOutputFile     (GraphicsExportComponent  ci,
  938.                                  FSSpec *               theFile)                            FIVEWORDINLINE(0x2F3C, 0x0004, 0x0041, 0x7000, 0xA82A);
  939. EXTERN_API( ComponentResult )
  940. GraphicsExportSetOutputHandle   (GraphicsExportComponent  ci,
  941.                                  Handle                 h)                                  FIVEWORDINLINE(0x2F3C, 0x0004, 0x0042, 0x7000, 0xA82A);
  942. EXTERN_API( ComponentResult )
  943. GraphicsExportGetOutputHandle   (GraphicsExportComponent  ci,
  944.                                  Handle *               h)                                  FIVEWORDINLINE(0x2F3C, 0x0004, 0x0043, 0x7000, 0xA82A);
  945. EXTERN_API( ComponentResult )
  946. GraphicsExportSetOutputOffsetAndMaxSize (GraphicsExportComponent  ci,
  947.                                  unsigned long          offset,
  948.                                  unsigned long          maxSize,
  949.                                  Boolean                truncateFile)                       FIVEWORDINLINE(0x2F3C, 0x000A, 0x0044, 0x7000, 0xA82A);
  950. EXTERN_API( ComponentResult )
  951. GraphicsExportGetOutputOffsetAndMaxSize (GraphicsExportComponent  ci,
  952.                                  unsigned long *        offset,
  953.                                  unsigned long *        maxSize,
  954.                                  Boolean *              truncateFile)                       FIVEWORDINLINE(0x2F3C, 0x000C, 0x0045, 0x7000, 0xA82A);
  955. EXTERN_API( ComponentResult )
  956. GraphicsExportSetOutputFileTypeAndCreator (GraphicsExportComponent  ci,
  957.                                  OSType                 fileType,
  958.                                  OSType                 fileCreator)                        FIVEWORDINLINE(0x2F3C, 0x0008, 0x0046, 0x7000, 0xA82A);
  959. EXTERN_API( ComponentResult )
  960. GraphicsExportGetOutputFileTypeAndCreator (GraphicsExportComponent  ci,
  961.                                  OSType *               fileType,
  962.                                  OSType *               fileCreator)                        FIVEWORDINLINE(0x2F3C, 0x0008, 0x0047, 0x7000, 0xA82A);
  963. /* Used by format-specific graphics exporters: */
  964. EXTERN_API( ComponentResult )
  965. GraphicsExportWriteOutputData   (GraphicsExportComponent  ci,
  966.                                  const void *           dataPtr,
  967.                                  unsigned long          dataSize)                           FIVEWORDINLINE(0x2F3C, 0x0008, 0x0048, 0x7000, 0xA82A);
  968. EXTERN_API( ComponentResult )
  969. GraphicsExportSetOutputMark     (GraphicsExportComponent  ci,
  970.                                  unsigned long          mark)                               FIVEWORDINLINE(0x2F3C, 0x0004, 0x0049, 0x7000, 0xA82A);
  971. EXTERN_API( ComponentResult )
  972. GraphicsExportGetOutputMark     (GraphicsExportComponent  ci,
  973.                                  unsigned long *        mark)                               FIVEWORDINLINE(0x2F3C, 0x0004, 0x004A, 0x7000, 0xA82A);
  974. EXTERN_API( ComponentResult )
  975. GraphicsExportReadOutputData    (GraphicsExportComponent  ci,
  976.                                  void *                 dataPtr,
  977.                                  unsigned long          dataOffset,
  978.                                  unsigned long          dataSize)                           FIVEWORDINLINE(0x2F3C, 0x000C, 0x004B, 0x7000, 0xA82A);
  979. /* Allows embedded thumbnail creation, if supported. */
  980. EXTERN_API( ComponentResult )
  981. GraphicsExportSetThumbnailEnabled (GraphicsExportComponent  ci,
  982.                                  Boolean                enableThumbnail,
  983.                                  long                   maxThumbnailWidth,
  984.                                  long                   maxThumbnailHeight)                 FIVEWORDINLINE(0x2F3C, 0x000A, 0x004C, 0x7000, 0xA82A);
  985. EXTERN_API( ComponentResult )
  986. GraphicsExportGetThumbnailEnabled (GraphicsExportComponent  ci,
  987.                                  Boolean *              thumbnailEnabled,
  988.                                  long *                 maxThumbnailWidth,
  989.                                  long *                 maxThumbnailHeight)                 FIVEWORDINLINE(0x2F3C, 0x000C, 0x004D, 0x7000, 0xA82A);
  990. /* Allows export of Exif files, if supported.  This disables Exif-incompatible settings such as grayscale JPEG and compressed TIFF, and enables export of Exif metadata. */
  991. EXTERN_API( ComponentResult )
  992. GraphicsExportSetExifEnabled    (GraphicsExportComponent  ci,
  993.                                  Boolean                enableExif)                         FIVEWORDINLINE(0x2F3C, 0x0002, 0x004E, 0x7000, 0xA82A);
  994. EXTERN_API( ComponentResult )
  995. GraphicsExportGetExifEnabled    (GraphicsExportComponent  ci,
  996.                                  Boolean *              exifEnabled)                        FIVEWORDINLINE(0x2F3C, 0x0004, 0x004F, 0x7000, 0xA82A);
  997. typedef ComponentInstance               ImageTranscoderComponent;
  998. enum {
  999.     ImageTranscodererComponentType = FOUR_CHAR_CODE('imtc')
  1000. };
  1001. /** These are ImageTranscoder procedures **/
  1002. EXTERN_API( ComponentResult )
  1003. ImageTranscoderBeginSequence    (ImageTranscoderComponent  itc,
  1004.                                  ImageDescriptionHandle  srcDesc,
  1005.                                  ImageDescriptionHandle * dstDesc,
  1006.                                  void *                 data,
  1007.                                  long                   dataSize)                           FIVEWORDINLINE(0x2F3C, 0x0010, 0x0001, 0x7000, 0xA82A);
  1008. EXTERN_API( ComponentResult )
  1009. ImageTranscoderConvert          (ImageTranscoderComponent  itc,
  1010.                                  void *                 srcData,
  1011.                                  long                   srcDataSize,
  1012.                                  void **                dstData,
  1013.                                  long *                 dstDataSize)                        FIVEWORDINLINE(0x2F3C, 0x0010, 0x0002, 0x7000, 0xA82A);
  1014. EXTERN_API( ComponentResult )
  1015. ImageTranscoderDisposeData      (ImageTranscoderComponent  itc,
  1016.                                  void *                 dstData)                            FIVEWORDINLINE(0x2F3C, 0x0004, 0x0003, 0x7000, 0xA82A);
  1017. EXTERN_API( ComponentResult )
  1018. ImageTranscoderEndSequence      (ImageTranscoderComponent  itc)                             FIVEWORDINLINE(0x2F3C, 0x0000, 0x0004, 0x7000, 0xA82A);
  1019. /* UPP call backs */
  1020. /* selectors for component calls */
  1021. enum {
  1022.     kGraphicsImportSetDataReferenceSelect      = 0x0001,
  1023.     kGraphicsImportGetDataReferenceSelect      = 0x0002,
  1024.     kGraphicsImportSetDataFileSelect           = 0x0003,
  1025.     kGraphicsImportGetDataFileSelect           = 0x0004,
  1026.     kGraphicsImportSetDataHandleSelect         = 0x0005,
  1027.     kGraphicsImportGetDataHandleSelect         = 0x0006,
  1028.     kGraphicsImportGetImageDescriptionSelect   = 0x0007,
  1029.     kGraphicsImportGetDataOffsetAndSizeSelect  = 0x0008,
  1030.     kGraphicsImportReadDataSelect              = 0x0009,
  1031.     kGraphicsImportSetClipSelect               = 0x000A,
  1032.     kGraphicsImportGetClipSelect               = 0x000B,
  1033.     kGraphicsImportSetSourceRectSelect         = 0x000C,
  1034.     kGraphicsImportGetSourceRectSelect         = 0x000D,
  1035.     kGraphicsImportGetNaturalBoundsSelect      = 0x000E,
  1036.     kGraphicsImportDrawSelect                  = 0x000F,
  1037.     kGraphicsImportSetGWorldSelect             = 0x0010,
  1038.     kGraphicsImportGetGWorldSelect             = 0x0011,
  1039.     kGraphicsImportSetMatrixSelect             = 0x0012,
  1040.     kGraphicsImportGetMatrixSelect             = 0x0013,
  1041.     kGraphicsImportSetBoundsRectSelect         = 0x0014,
  1042.     kGraphicsImportGetBoundsRectSelect         = 0x0015,
  1043.     kGraphicsImportSaveAsPictureSelect         = 0x0016,
  1044.     kGraphicsImportSetGraphicsModeSelect       = 0x0017,
  1045.     kGraphicsImportGetGraphicsModeSelect       = 0x0018,
  1046.     kGraphicsImportSetQualitySelect            = 0x0019,
  1047.     kGraphicsImportGetQualitySelect            = 0x001A,
  1048.     kGraphicsImportSaveAsQuickTimeImageFileSelect = 0x001B,
  1049.     kGraphicsImportSetDataReferenceOffsetAndLimitSelect = 0x001C,
  1050.     kGraphicsImportGetDataReferenceOffsetAndLimitSelect = 0x001D,
  1051.     kGraphicsImportGetAliasedDataReferenceSelect = 0x001E,
  1052.     kGraphicsImportValidateSelect              = 0x001F,
  1053.     kGraphicsImportGetMetaDataSelect           = 0x0020,
  1054.     kGraphicsImportGetMIMETypeListSelect       = 0x0021,
  1055.     kGraphicsImportDoesDrawAllPixelsSelect     = 0x0022,
  1056.     kGraphicsImportGetAsPictureSelect          = 0x0023,
  1057.     kGraphicsImportExportImageFileSelect       = 0x0024,
  1058.     kGraphicsImportGetExportImageTypeListSelect = 0x0025,
  1059.     kGraphicsImportDoExportImageFileDialogSelect = 0x0026,
  1060.     kGraphicsImportGetExportSettingsAsAtomContainerSelect = 0x0027,
  1061.     kGraphicsImportSetExportSettingsFromAtomContainerSelect = 0x0028,
  1062.     kGraphicsImportSetProgressProcSelect       = 0x0029,
  1063.     kGraphicsImportGetProgressProcSelect       = 0x002A,
  1064.     kGraphicsImportGetImageCountSelect         = 0x002B,
  1065.     kGraphicsImportSetImageIndexSelect         = 0x002C,
  1066.     kGraphicsImportGetImageIndexSelect         = 0x002D,
  1067.     kGraphicsImportGetDataOffsetAndSize64Select = 0x002E,
  1068.     kGraphicsImportReadData64Select            = 0x002F,
  1069.     kGraphicsImportSetDataReferenceOffsetAndLimit64Select = 0x0030,
  1070.     kGraphicsImportGetDataReferenceOffsetAndLimit64Select = 0x0031,
  1071.     kGraphicsImportGetDefaultMatrixSelect      = 0x0032,
  1072.     kGraphicsImportGetDefaultClipSelect        = 0x0033,
  1073.     kGraphicsImportGetDefaultGraphicsModeSelect = 0x0034,
  1074.     kGraphicsImportGetDefaultSourceRectSelect  = 0x0035,
  1075.     kGraphicsImportGetColorSyncProfileSelect   = 0x0036,
  1076.     kGraphicsImportSetDestRectSelect           = 0x0037,
  1077.     kGraphicsImportGetDestRectSelect           = 0x0038,
  1078.     kGraphicsImportSetFlagsSelect              = 0x0039,
  1079.     kGraphicsImportGetFlagsSelect              = 0x003A,
  1080.     kGraphicsImportGetBaseDataOffsetAndSize64Select = 0x003D,
  1081.     kGraphicsImportSetImageIndexToThumbnailSelect = 0x003E,
  1082.     kGraphicsExportDoExportSelect              = 0x0001,
  1083.     kGraphicsExportCanTranscodeSelect          = 0x0002,
  1084.     kGraphicsExportDoTranscodeSelect           = 0x0003,
  1085.     kGraphicsExportCanUseCompressorSelect      = 0x0004,
  1086.     kGraphicsExportDoUseCompressorSelect       = 0x0005,
  1087.     kGraphicsExportDoStandaloneExportSelect    = 0x0006,
  1088.     kGraphicsExportGetDefaultFileTypeAndCreatorSelect = 0x0007,
  1089.     kGraphicsExportGetDefaultFileNameExtensionSelect = 0x0008,
  1090.     kGraphicsExportGetMIMETypeListSelect       = 0x0009,
  1091.     kGraphicsExportRequestSettingsSelect       = 0x000B,
  1092.     kGraphicsExportSetSettingsFromAtomContainerSelect = 0x000C,
  1093.     kGraphicsExportGetSettingsAsAtomContainerSelect = 0x000D,
  1094.     kGraphicsExportGetSettingsAsTextSelect     = 0x000E,
  1095.     kGraphicsExportSetDontRecompressSelect     = 0x000F,
  1096.     kGraphicsExportGetDontRecompressSelect     = 0x0010,
  1097.     kGraphicsExportSetInterlaceStyleSelect     = 0x0011,
  1098.     kGraphicsExportGetInterlaceStyleSelect     = 0x0012,
  1099.     kGraphicsExportSetMetaDataSelect           = 0x0013,
  1100.     kGraphicsExportGetMetaDataSelect           = 0x0014,
  1101.     kGraphicsExportSetTargetDataSizeSelect     = 0x0015,
  1102.     kGraphicsExportGetTargetDataSizeSelect     = 0x0016,
  1103.     kGraphicsExportSetCompressionMethodSelect  = 0x0017,
  1104.     kGraphicsExportGetCompressionMethodSelect  = 0x0018,
  1105.     kGraphicsExportSetCompressionQualitySelect = 0x0019,
  1106.     kGraphicsExportGetCompressionQualitySelect = 0x001A,
  1107.     kGraphicsExportSetResolutionSelect         = 0x001B,
  1108.     kGraphicsExportGetResolutionSelect         = 0x001C,
  1109.     kGraphicsExportSetDepthSelect              = 0x001D,
  1110.     kGraphicsExportGetDepthSelect              = 0x001E,
  1111.     kGraphicsExportSetColorSyncProfileSelect   = 0x0021,
  1112.     kGraphicsExportGetColorSyncProfileSelect   = 0x0022,
  1113.     kGraphicsExportSetProgressProcSelect       = 0x0023,
  1114.     kGraphicsExportGetProgressProcSelect       = 0x0024,
  1115.     kGraphicsExportSetInputDataReferenceSelect = 0x0025,
  1116.     kGraphicsExportGetInputDataReferenceSelect = 0x0026,
  1117.     kGraphicsExportSetInputFileSelect          = 0x0027,
  1118.     kGraphicsExportGetInputFileSelect          = 0x0028,
  1119.     kGraphicsExportSetInputHandleSelect        = 0x0029,
  1120.     kGraphicsExportGetInputHandleSelect        = 0x002A,
  1121.     kGraphicsExportSetInputPtrSelect           = 0x002B,
  1122.     kGraphicsExportGetInputPtrSelect           = 0x002C,
  1123.     kGraphicsExportSetInputGraphicsImporterSelect = 0x002D,
  1124.     kGraphicsExportGetInputGraphicsImporterSelect = 0x002E,
  1125.     kGraphicsExportSetInputPictureSelect       = 0x002F,
  1126.     kGraphicsExportGetInputPictureSelect       = 0x0030,
  1127.     kGraphicsExportSetInputGWorldSelect        = 0x0031,
  1128.     kGraphicsExportGetInputGWorldSelect        = 0x0032,
  1129.     kGraphicsExportSetInputPixmapSelect        = 0x0033,
  1130.     kGraphicsExportGetInputPixmapSelect        = 0x0034,
  1131.     kGraphicsExportSetInputOffsetAndLimitSelect = 0x0035,
  1132.     kGraphicsExportGetInputOffsetAndLimitSelect = 0x0036,
  1133.     kGraphicsExportMayExporterReadInputDataSelect = 0x0037,
  1134.     kGraphicsExportGetInputDataSizeSelect      = 0x0038,
  1135.     kGraphicsExportReadInputDataSelect         = 0x0039,
  1136.     kGraphicsExportGetInputImageDescriptionSelect = 0x003A,
  1137.     kGraphicsExportGetInputImageDimensionsSelect = 0x003B,
  1138.     kGraphicsExportGetInputImageDepthSelect    = 0x003C,
  1139.     kGraphicsExportDrawInputImageSelect        = 0x003D,
  1140.     kGraphicsExportSetOutputDataReferenceSelect = 0x003E,
  1141.     kGraphicsExportGetOutputDataReferenceSelect = 0x003F,
  1142.     kGraphicsExportSetOutputFileSelect         = 0x0040,
  1143.     kGraphicsExportGetOutputFileSelect         = 0x0041,
  1144.     kGraphicsExportSetOutputHandleSelect       = 0x0042,
  1145.     kGraphicsExportGetOutputHandleSelect       = 0x0043,
  1146.     kGraphicsExportSetOutputOffsetAndMaxSizeSelect = 0x0044,
  1147.     kGraphicsExportGetOutputOffsetAndMaxSizeSelect = 0x0045,
  1148.     kGraphicsExportSetOutputFileTypeAndCreatorSelect = 0x0046,
  1149.     kGraphicsExportGetOutputFileTypeAndCreatorSelect = 0x0047,
  1150.     kGraphicsExportWriteOutputDataSelect       = 0x0048,
  1151.     kGraphicsExportSetOutputMarkSelect         = 0x0049,
  1152.     kGraphicsExportGetOutputMarkSelect         = 0x004A,
  1153.     kGraphicsExportReadOutputDataSelect        = 0x004B,
  1154.     kGraphicsExportSetThumbnailEnabledSelect   = 0x004C,
  1155.     kGraphicsExportGetThumbnailEnabledSelect   = 0x004D,
  1156.     kGraphicsExportSetExifEnabledSelect        = 0x004E,
  1157.     kGraphicsExportGetExifEnabledSelect        = 0x004F,
  1158.     kImageTranscoderBeginSequenceSelect        = 0x0001,
  1159.     kImageTranscoderConvertSelect              = 0x0002,
  1160.     kImageTranscoderDisposeDataSelect          = 0x0003,
  1161.     kImageTranscoderEndSequenceSelect          = 0x0004
  1162. };
  1163. #if PRAGMA_STRUCT_ALIGN
  1164.     #pragma options align=reset
  1165. #elif PRAGMA_STRUCT_PACKPUSH
  1166.     #pragma pack(pop)
  1167. #elif PRAGMA_STRUCT_PACK
  1168.     #pragma pack()
  1169. #endif
  1170. #ifdef PRAGMA_IMPORT_OFF
  1171. #pragma import off
  1172. #elif PRAGMA_IMPORT
  1173. #pragma import reset
  1174. #endif
  1175. #ifdef __cplusplus
  1176. }
  1177. #endif
  1178. #endif /* __IMAGECOMPRESSION__ */