1 /* Copyright (C) 2005-2011 Fabio Riccardi */
2 
3 package com.lightcrafts.image.types;
4 
5 /**
6  * An <code>AdoneConstants</code> defines some constants for Adobe.
7  *
8  * @author Paul J. Lucas [paul@lightcrafts.com]
9  */
10 public interface AdobeConstants {
11 
12     /** The size (in bytes) of an Adobe JPEG APPE segment. */
13     int ADOBE_APPE_SEGMENT_SIZE = 12;
14 
15     /** Adobe Color Transformation Code: Unknown. */
16     byte ADOBE_CTT_UNKNOWN = 0;
17 
18     /** Adobe Color Transformation Code: YCbCr. */
19     byte ADOBE_CTT_YCBCR   = 1;
20 
21     /** Adobe Color Transformation Code: YCCK. */
22     byte ADOBE_CTT_YCCK    = 2;
23 
24     /**
25      * The minimum size for an Adobe resource block.  The bytes are:
26      *  <blockquote>
27      *    <table cellpadding="0" cellspacing="0">
28      *      <tr>
29      *        <td align="right">0-3 =&nbsp;</td>
30      *        <td><code>8BIM</code></td>
31      *      </tr>
32      *      <tr>
33      *        <td align="right">4-5 =&nbsp;</td>
34      *        <td>Resource ID (big endian)</td>
35      *      </tr>
36      *      <tr>
37      *        <td align="right">6-9 =&nbsp;</td>
38      *        <td>Resource name (Pascal string padded to be even length)</td>
39      *      </tr>
40      *      <tr>
41      *        <td align="right">10-... =&nbsp;</td>
42      *        <td>Resource data</td>
43      *      </tr>
44      *    </table>
45      *  </blockquote>
46      */
47     int ADOBE_RESOURCE_BLOCK_MIN_SIZE = 14;
48 
49     /**
50      * Photoshop 3.0 identification string; used inside the APPE JPEG segment
51      * header for IPTC metadata.
52      */
53     String PHOTOSHOP_3_IDENT = "Photoshop 3.0";
54 
55     /**
56      * Thumbnail resource ID for Photoshop 5.0 and later; used inside the
57      * <code>TIFF_PHOTOSHOP_IMAGE_RESOURCES</code> metadata tag.
58      */
59     int PHOTOSHOP_5_THUMBNAIL_RESOURCE_ID = 1036;
60 
61     /**
62      * Photoshop's creator code; used as a signature for Photoshop data blocks.
63      */
64     String PHOTOSHOP_CREATOR_CODE = "8BIM";
65 
66     /**
67      * Photoshop IPTC marker; used inside the APPE JPEG segment header for IPTC
68      * metadata.
69      */
70     short PHOTOSHOP_IPTC_RESOURCE_ID = 0x0404;
71 
72 }
73 /* vim:set et sw=4 ts=4: */
74