commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dam...@apache.org
Subject svn commit: r1304789 - in /commons/proper/sanselan/trunk/src: main/java/org/apache/commons/sanselan/formats/tiff/constants/ test/java/org/apache/commons/sanselan/formats/tiff/
Date Sat, 24 Mar 2012 13:33:40 GMT
Author: damjan
Date: Sat Mar 24 13:33:40 2012
New Revision: 1304789

URL: http://svn.apache.org/viewvc?rev=1304789&view=rev
Log:
Factor out Microsoft HD photo tags.


Added:
    commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/MicrosoftHdPhotoTagConstants.java
  (with props)
Modified:
    commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/AllTagConstants.java
    commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/ExifTagConstants.java
    commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/MolecularDynamicsGelTagConstants.java
    commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/TagConstantsUtils.java
    commons/proper/sanselan/trunk/src/test/java/org/apache/commons/sanselan/formats/tiff/TiffTagIntegrityTest.java

Modified: commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/AllTagConstants.java
URL: http://svn.apache.org/viewvc/commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/AllTagConstants.java?rev=1304789&r1=1304788&r2=1304789&view=diff
==============================================================================
--- commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/AllTagConstants.java
(original)
+++ commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/AllTagConstants.java
Sat Mar 24 13:33:40 2012
@@ -28,8 +28,9 @@ public interface AllTagConstants extends
         ExifTagConstants,
         GpsTagConstants,
         HylaFaxTagConstants,
-        MolecularDynamicsGelTagConstants,
         MicrosoftTagConstants,
+        MicrosoftHdPhotoTagConstants,
+        MolecularDynamicsGelTagConstants,
         Rfc2301TagConstants,
         Tiff4TagConstants,
         TiffEpTagConstants,
@@ -44,8 +45,9 @@ public interface AllTagConstants extends
                     ExifTagConstants.ALL_EXIF_TAGS,
                     GpsTagConstants.ALL_GPS_TAGS,
                     HylaFaxTagConstants.ALL_HYLAFAX_TAGS,
-                    MolecularDynamicsGelTagConstants.ALL_MOLECULAR_DYNAMICS_GEL_TAGS,
                     MicrosoftTagConstants.ALL_MICROSOFT_TAGS,
+                    MicrosoftHdPhotoTagConstants.ALL_MICROSOFT_HD_PHOTO_TAGS,
+                    MolecularDynamicsGelTagConstants.ALL_MOLECULAR_DYNAMICS_GEL_TAGS,
                     Rfc2301TagConstants.ALL_RFC_2301_TAGS,
                     Tiff4TagConstants.ALL_TIFF_4_TAGS,
                     TiffEpTagConstants.ALL_TIFF_EP_TAGS,

Modified: commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/ExifTagConstants.java
URL: http://svn.apache.org/viewvc/commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/ExifTagConstants.java?rev=1304789&r1=1304788&r2=1304789&view=diff
==============================================================================
--- commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/ExifTagConstants.java
(original)
+++ commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/ExifTagConstants.java
Sat Mar 24 13:33:40 2012
@@ -502,123 +502,6 @@ public interface ExifTagConstants
             TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
     public static final TagInfoRational EXIF_TAG_GAMMA = new TagInfoRational("Gamma", 0xa500,
             1, TiffDirectoryType.EXIF_DIRECTORY_EXIF_IFD);
-    public static final TagInfoByte EXIF_TAG_PIXEL_FORMAT = new TagInfoByte(
-            "Pixel Format", 0xbc01, 16,
-            TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
-    // FIXME: convert to GUIDs
-    public static final int PIXEL_FORMAT_VALUE_BLACK_AND_WHITE = 0x5;
-    public static final int PIXEL_FORMAT_VALUE_8_BIT_GRAY = 0x8;
-    public static final int PIXEL_FORMAT_VALUE_16_BIT_BGR555 = 0x9;
-    public static final int PIXEL_FORMAT_VALUE_16_BIT_BGR565 = 0xa;
-    public static final int PIXEL_FORMAT_VALUE_16_BIT_GRAY = 0xb;
-    public static final int PIXEL_FORMAT_VALUE_24_BIT_BGR = 0xc;
-    public static final int PIXEL_FORMAT_VALUE_24_BIT_RGB = 0xd;
-    public static final int PIXEL_FORMAT_VALUE_32_BIT_BGR = 0xe;
-    public static final int PIXEL_FORMAT_VALUE_32_BIT_BGRA = 0xf;
-    public static final int PIXEL_FORMAT_VALUE_32_BIT_PBGRA = 0x10;
-    public static final int PIXEL_FORMAT_VALUE_32_BIT_GRAY_FLOAT = 0x11;
-    public static final int PIXEL_FORMAT_VALUE_48_BIT_RGB_FIXED_POINT = 0x12;
-    public static final int PIXEL_FORMAT_VALUE_32_BIT_BGR101010 = 0x13;
-    public static final int PIXEL_FORMAT_VALUE_48_BIT_RGB = 0x15;
-    public static final int PIXEL_FORMAT_VALUE_64_BIT_RGBA = 0x16;
-    public static final int PIXEL_FORMAT_VALUE_64_BIT_PRGBA = 0x17;
-    public static final int PIXEL_FORMAT_VALUE_96_BIT_RGB_FIXED_POINT = 0x18;
-    public static final int PIXEL_FORMAT_VALUE_128_BIT_RGBA_FLOAT = 0x19;
-    public static final int PIXEL_FORMAT_VALUE_128_BIT_PRGBA_FLOAT = 0x1a;
-    public static final int PIXEL_FORMAT_VALUE_128_BIT_RGB_FLOAT = 0x1b;
-    public static final int PIXEL_FORMAT_VALUE_32_BIT_CMYK = 0x1c;
-    public static final int PIXEL_FORMAT_VALUE_64_BIT_RGBA_FIXED_POINT = 0x1d;
-    public static final int PIXEL_FORMAT_VALUE_128_BIT_RGBA_FIXED_POINT = 0x1e;
-    public static final int PIXEL_FORMAT_VALUE_64_BIT_CMYK = 0x1f;
-    public static final int PIXEL_FORMAT_VALUE_24_BIT_3_CHANNELS = 0x20;
-    public static final int PIXEL_FORMAT_VALUE_32_BIT_4_CHANNELS = 0x21;
-    public static final int PIXEL_FORMAT_VALUE_40_BIT_5_CHANNELS = 0x22;
-    public static final int PIXEL_FORMAT_VALUE_48_BIT_6_CHANNELS = 0x23;
-    public static final int PIXEL_FORMAT_VALUE_56_BIT_7_CHANNELS = 0x24;
-    public static final int PIXEL_FORMAT_VALUE_64_BIT_8_CHANNELS = 0x25;
-    public static final int PIXEL_FORMAT_VALUE_48_BIT_3_CHANNELS = 0x26;
-    public static final int PIXEL_FORMAT_VALUE_64_BIT_4_CHANNELS = 0x27;
-    public static final int PIXEL_FORMAT_VALUE_80_BIT_5_CHANNELS = 0x28;
-    public static final int PIXEL_FORMAT_VALUE_96_BIT_6_CHANNELS = 0x29;
-    public static final int PIXEL_FORMAT_VALUE_112_BIT_7_CHANNELS = 0x2a;
-    public static final int PIXEL_FORMAT_VALUE_128_BIT_8_CHANNELS = 0x2b;
-    public static final int PIXEL_FORMAT_VALUE_40_BIT_CMYK_ALPHA = 0x2c;
-    public static final int PIXEL_FORMAT_VALUE_80_BIT_CMYK_ALPHA = 0x2d;
-    public static final int PIXEL_FORMAT_VALUE_32_BIT_3_CHANNELS_ALPHA = 0x2e;
-    public static final int PIXEL_FORMAT_VALUE_40_BIT_4_CHANNELS_ALPHA = 0x2f;
-    public static final int PIXEL_FORMAT_VALUE_48_BIT_5_CHANNELS_ALPHA = 0x30;
-    public static final int PIXEL_FORMAT_VALUE_56_BIT_6_CHANNELS_ALPHA = 0x31;
-    public static final int PIXEL_FORMAT_VALUE_64_BIT_7_CHANNELS_ALPHA = 0x32;
-    public static final int PIXEL_FORMAT_VALUE_72_BIT_8_CHANNELS_ALPHA = 0x33;
-    public static final int PIXEL_FORMAT_VALUE_64_BIT_3_CHANNELS_ALPHA = 0x34;
-    public static final int PIXEL_FORMAT_VALUE_80_BIT_4_CHANNELS_ALPHA = 0x35;
-    public static final int PIXEL_FORMAT_VALUE_96_BIT_5_CHANNELS_ALPHA = 0x36;
-    public static final int PIXEL_FORMAT_VALUE_112_BIT_6_CHANNELS_ALPHA = 0x37;
-    public static final int PIXEL_FORMAT_VALUE_128_BIT_7_CHANNELS_ALPHA = 0x38;
-    public static final int PIXEL_FORMAT_VALUE_144_BIT_8_CHANNELS_ALPHA = 0x39;
-    public static final int PIXEL_FORMAT_VALUE_64_BIT_RGBA_HALF = 0x3a;
-    public static final int PIXEL_FORMAT_VALUE_48_BIT_RGB_HALF = 0x3b;
-    public static final int PIXEL_FORMAT_VALUE_32_BIT_RGBE = 0x3d;
-    public static final int PIXEL_FORMAT_VALUE_16_BIT_GRAY_HALF = 0x3e;
-    public static final int PIXEL_FORMAT_VALUE_32_BIT_GRAY_FIXED_POINT = 0x3f;
-    public static final TagInfoLong EXIF_TAG_TRANSFOMATION = new TagInfoLong(
-            "Transfomation", 0xbc02, 1,
-            TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
-    public static final int TRANSFOMATION_VALUE_HORIZONTAL_NORMAL = 0;
-    public static final int TRANSFOMATION_VALUE_MIRROR_VERTICAL = 1;
-    public static final int TRANSFOMATION_VALUE_MIRROR_HORIZONTAL = 2;
-    public static final int TRANSFOMATION_VALUE_ROTATE_180 = 3;
-    public static final int TRANSFOMATION_VALUE_ROTATE_90_CW = 4;
-    public static final int TRANSFOMATION_VALUE_MIRROR_HORIZONTAL_AND_ROTATE_90_CW = 5;
-    public static final int TRANSFOMATION_VALUE_MIRROR_HORIZONTAL_AND_ROTATE_270_CW = 6;
-    public static final int TRANSFOMATION_VALUE_ROTATE_270_CW = 7;
-    public static final TagInfoLong EXIF_TAG_UNCOMPRESSED = new TagInfoLong(
-            "Uncompressed", 0xbc03, 1,
-            TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
-    public static final int UNCOMPRESSED_VALUE_NO = 0;
-    public static final int UNCOMPRESSED_VALUE_YES = 1;
-    public static final TagInfoLong EXIF_TAG_IMAGE_TYPE = new TagInfoLong("Image Type",
-            0xbc04, 1, TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
-    public static final TagInfoLong EXIF_TAG_IMAGE_WIDTH = new TagInfoLong(
-            "Image Width", 0xbc80, 1,
-            TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
-    public static final TagInfoLong EXIF_TAG_IMAGE_HEIGHT = new TagInfoLong(
-            "Image Height", 0xbc81, 1,
-            TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
-    public static final TagInfoFloat EXIF_TAG_WIDTH_RESOLUTION = new TagInfoFloat(
-            "Width Resolution", 0xbc82, 1,
-            TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
-    public static final TagInfoFloat EXIF_TAG_HEIGHT_RESOLUTION = new TagInfoFloat(
-            "Height Resolution", 0xbc83, 1,
-            TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
-    // FIXME: might be an offset?
-    public static final TagInfoLong EXIF_TAG_IMAGE_OFFSET = new TagInfoLong(
-            "Image Offset", 0xbcc0, 1,
-            TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
-    public static final TagInfoLong EXIF_TAG_IMAGE_BYTE_COUNT = new TagInfoLong(
-            "Image Byte Count", 0xbcc1, 1,
-            TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
-    // FIXME: might be an offset?
-    public static final TagInfoLong EXIF_TAG_ALPHA_OFFSET = new TagInfoLong(
-            "Alpha Offset", 0xbcc2, 1,
-            TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
-    public static final TagInfoLong EXIF_TAG_ALPHA_BYTE_COUNT = new TagInfoLong(
-            "Alpha Byte Count", 0xbcc3, 1,
-            TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
-    public static final TagInfoByte EXIF_TAG_IMAGE_DATA_DISCARD = new TagInfoByte(
-            "Image Data Discard", 0xbcc4, 1,
-            TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
-    public static final int IMAGE_DATA_DISCARD_VALUE_FULL_RESOLUTION = 0;
-    public static final int IMAGE_DATA_DISCARD_VALUE_FLEXBITS_DISCARDED = 1;
-    public static final int IMAGE_DATA_DISCARD_VALUE_HIGH_PASS_FREQUENCY_DATA_DISCARDED =
2;
-    public static final int IMAGE_DATA_DISCARD_VALUE_HIGHPASS_AND_LOW_PASS_FREQUENCY_DATA_DISCARDED
= 3;
-    public static final TagInfoByte EXIF_TAG_ALPHA_DATA_DISCARD = new TagInfoByte(
-            "Alpha Data Discard", 0xbcc5, 1,
-            TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
-    public static final int ALPHA_DATA_DISCARD_VALUE_FULL_RESOLUTION = 0;
-    public static final int ALPHA_DATA_DISCARD_VALUE_FLEXBITS_DISCARDED = 1;
-    public static final int ALPHA_DATA_DISCARD_VALUE_HIGH_PASS_FREQUENCY_DATA_DISCARDED =
2;
-    public static final int ALPHA_DATA_DISCARD_VALUE_HIGHPASS_AND_LOW_PASS_FREQUENCY_DATA_DISCARDED
= 3;
     public static final TagInfoAscii EXIF_TAG_OCE_SCANJOB_DESC = new TagInfoAscii(
             "Oce Scanjob Desc", 0xc427, -1,
             TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
@@ -936,13 +819,7 @@ public interface ExifTagConstants
                     EXIF_TAG_DEVICE_SETTING_DESCRIPTION,
                     EXIF_TAG_SUBJECT_DISTANCE_RANGE, EXIF_TAG_IMAGE_UNIQUE_ID,
                     EXIF_TAG_GDALMETADATA, EXIF_TAG_GDALNO_DATA, EXIF_TAG_GAMMA,
-                    EXIF_TAG_PIXEL_FORMAT, EXIF_TAG_TRANSFOMATION,
-                    EXIF_TAG_UNCOMPRESSED, EXIF_TAG_IMAGE_TYPE, EXIF_TAG_IMAGE_WIDTH,
-                    EXIF_TAG_IMAGE_HEIGHT, EXIF_TAG_WIDTH_RESOLUTION,
-                    EXIF_TAG_HEIGHT_RESOLUTION, EXIF_TAG_IMAGE_OFFSET,
-                    EXIF_TAG_IMAGE_BYTE_COUNT, EXIF_TAG_ALPHA_OFFSET,
-                    EXIF_TAG_ALPHA_BYTE_COUNT, EXIF_TAG_IMAGE_DATA_DISCARD,
-                    EXIF_TAG_ALPHA_DATA_DISCARD, EXIF_TAG_OCE_SCANJOB_DESC,
+                    EXIF_TAG_OCE_SCANJOB_DESC,
                     EXIF_TAG_OCE_APPLICATION_SELECTOR, EXIF_TAG_OCE_IDNUMBER,
                     EXIF_TAG_OCE_IMAGE_LOGIC, EXIF_TAG_ANNOTATIONS, EXIF_TAG_PRINT_IM,
                     EXIF_TAG_DNG_VERSION, EXIF_TAG_DNG_BACKWARD_VERSION,

Added: commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/MicrosoftHdPhotoTagConstants.java
URL: http://svn.apache.org/viewvc/commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/MicrosoftHdPhotoTagConstants.java?rev=1304789&view=auto
==============================================================================
--- commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/MicrosoftHdPhotoTagConstants.java
(added)
+++ commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/MicrosoftHdPhotoTagConstants.java
Sat Mar 24 13:33:40 2012
@@ -0,0 +1,229 @@
+package org.apache.commons.sanselan.formats.tiff.constants;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.apache.commons.sanselan.common.BinaryConstant;
+import org.apache.commons.sanselan.formats.tiff.taginfos.TagInfo;
+import org.apache.commons.sanselan.formats.tiff.taginfos.TagInfoByte;
+import org.apache.commons.sanselan.formats.tiff.taginfos.TagInfoFloat;
+import org.apache.commons.sanselan.formats.tiff.taginfos.TagInfoLong;
+import org.apache.commons.sanselan.formats.tiff.taginfos.TagInfoUndefined;
+
+/**
+ * Microsoft's HDP/WDP file format. 
+ */
+public interface MicrosoftHdPhotoTagConstants extends TiffFieldTypeConstants {
+    /*
+     * The byte order for this GUID field is as follows:
+     * Data1 (int), Data2 (short), Data3 (short) are little-endian,
+     * Data4 (char[8]) is endian-independent.
+     */
+    public static final TagInfoByte EXIF_TAG_PIXEL_FORMAT = new TagInfoByte(
+            "Pixel Format", 0xbc01, 16,
+            TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
+    public static final BinaryConstant PIXEL_FORMAT_VALUE_BLACK_AND_WHITE =
+            TagConstantsUtils.createMicrosoftHdPhotoGuidEndingWith((byte)0x05);
+    public static final BinaryConstant PIXEL_FORMAT_VALUE_8_BIT_GRAY =
+            TagConstantsUtils.createMicrosoftHdPhotoGuidEndingWith((byte)0x08);
+    public static final BinaryConstant PIXEL_FORMAT_VALUE_16_BIT_BGR555 =
+            TagConstantsUtils.createMicrosoftHdPhotoGuidEndingWith((byte)0x9);
+    public static final BinaryConstant PIXEL_FORMAT_VALUE_16_BIT_BGR565 =
+            TagConstantsUtils.createMicrosoftHdPhotoGuidEndingWith((byte)0xa);
+    public static final BinaryConstant PIXEL_FORMAT_VALUE_16_BIT_GRAY =
+            TagConstantsUtils.createMicrosoftHdPhotoGuidEndingWith((byte)0xb);
+    public static final BinaryConstant PIXEL_FORMAT_VALUE_24_BIT_BGR =
+            TagConstantsUtils.createMicrosoftHdPhotoGuidEndingWith((byte)0xc);
+    public static final BinaryConstant PIXEL_FORMAT_VALUE_24_BIT_RGB =
+            TagConstantsUtils.createMicrosoftHdPhotoGuidEndingWith((byte)0xd);
+    public static final BinaryConstant PIXEL_FORMAT_VALUE_32_BIT_BGR =
+            TagConstantsUtils.createMicrosoftHdPhotoGuidEndingWith((byte)0xe);
+    public static final BinaryConstant PIXEL_FORMAT_VALUE_32_BIT_BGRA =
+            TagConstantsUtils.createMicrosoftHdPhotoGuidEndingWith((byte)0xf);
+    public static final BinaryConstant PIXEL_FORMAT_VALUE_32_BIT_PBGRA =
+            TagConstantsUtils.createMicrosoftHdPhotoGuidEndingWith((byte)0x10);
+    public static final BinaryConstant PIXEL_FORMAT_VALUE_32_BIT_GRAY_FLOAT =
+            TagConstantsUtils.createMicrosoftHdPhotoGuidEndingWith((byte)0x11);
+    public static final BinaryConstant PIXEL_FORMAT_VALUE_48_BIT_RGB_FIXED_POINT =
+            TagConstantsUtils.createMicrosoftHdPhotoGuidEndingWith((byte)0x12);
+    public static final BinaryConstant PIXEL_FORMAT_VALUE_32_BIT_BGR101010 =
+            TagConstantsUtils.createMicrosoftHdPhotoGuidEndingWith((byte)0x13);
+    public static final BinaryConstant PIXEL_FORMAT_VALUE_48_BIT_RGB =
+            TagConstantsUtils.createMicrosoftHdPhotoGuidEndingWith((byte)0x15);
+    public static final BinaryConstant PIXEL_FORMAT_VALUE_64_BIT_RGBA =
+            TagConstantsUtils.createMicrosoftHdPhotoGuidEndingWith((byte)0x16);
+    public static final BinaryConstant PIXEL_FORMAT_VALUE_64_BIT_PRGBA =
+            TagConstantsUtils.createMicrosoftHdPhotoGuidEndingWith((byte)0x17);
+    public static final BinaryConstant PIXEL_FORMAT_VALUE_96_BIT_RGB_FIXED_POINT =
+            TagConstantsUtils.createMicrosoftHdPhotoGuidEndingWith((byte)0x18);
+    public static final BinaryConstant PIXEL_FORMAT_VALUE_128_BIT_RGBA_FLOAT =
+            TagConstantsUtils.createMicrosoftHdPhotoGuidEndingWith((byte)0x19);
+    public static final BinaryConstant PIXEL_FORMAT_VALUE_128_BIT_PRGBA_FLOAT =
+            TagConstantsUtils.createMicrosoftHdPhotoGuidEndingWith((byte)0x1a);
+    public static final BinaryConstant PIXEL_FORMAT_VALUE_128_BIT_RGB_FLOAT =
+            TagConstantsUtils.createMicrosoftHdPhotoGuidEndingWith((byte)0x1b);
+    public static final BinaryConstant PIXEL_FORMAT_VALUE_32_BIT_CMYK =
+            TagConstantsUtils.createMicrosoftHdPhotoGuidEndingWith((byte)0x1c);
+    public static final BinaryConstant PIXEL_FORMAT_VALUE_64_BIT_RGBA_FIXED_POINT =
+            TagConstantsUtils.createMicrosoftHdPhotoGuidEndingWith((byte)0x1d);
+    public static final BinaryConstant PIXEL_FORMAT_VALUE_128_BIT_RGBA_FIXED_POINT =
+            TagConstantsUtils.createMicrosoftHdPhotoGuidEndingWith((byte)0x1e);
+    public static final BinaryConstant PIXEL_FORMAT_VALUE_64_BIT_CMYK =
+            TagConstantsUtils.createMicrosoftHdPhotoGuidEndingWith((byte)0x1f);
+    public static final BinaryConstant PIXEL_FORMAT_VALUE_24_BIT_3_CHANNELS =
+            TagConstantsUtils.createMicrosoftHdPhotoGuidEndingWith((byte)0x20);
+    public static final BinaryConstant PIXEL_FORMAT_VALUE_32_BIT_4_CHANNELS =
+            TagConstantsUtils.createMicrosoftHdPhotoGuidEndingWith((byte)0x21);
+    public static final BinaryConstant PIXEL_FORMAT_VALUE_40_BIT_5_CHANNELS =
+            TagConstantsUtils.createMicrosoftHdPhotoGuidEndingWith((byte)0x22);
+    public static final BinaryConstant PIXEL_FORMAT_VALUE_48_BIT_6_CHANNELS =
+            TagConstantsUtils.createMicrosoftHdPhotoGuidEndingWith((byte)0x23);
+    public static final BinaryConstant PIXEL_FORMAT_VALUE_56_BIT_7_CHANNELS =
+            TagConstantsUtils.createMicrosoftHdPhotoGuidEndingWith((byte)0x24);
+    public static final BinaryConstant PIXEL_FORMAT_VALUE_64_BIT_8_CHANNELS =
+            TagConstantsUtils.createMicrosoftHdPhotoGuidEndingWith((byte)0x25);
+    public static final BinaryConstant PIXEL_FORMAT_VALUE_48_BIT_3_CHANNELS =
+            TagConstantsUtils.createMicrosoftHdPhotoGuidEndingWith((byte)0x26);
+    public static final BinaryConstant PIXEL_FORMAT_VALUE_64_BIT_4_CHANNELS =
+            TagConstantsUtils.createMicrosoftHdPhotoGuidEndingWith((byte)0x27);
+    public static final BinaryConstant PIXEL_FORMAT_VALUE_80_BIT_5_CHANNELS =
+            TagConstantsUtils.createMicrosoftHdPhotoGuidEndingWith((byte)0x28);
+    public static final BinaryConstant PIXEL_FORMAT_VALUE_96_BIT_6_CHANNELS =
+            TagConstantsUtils.createMicrosoftHdPhotoGuidEndingWith((byte)0x29);
+    public static final BinaryConstant PIXEL_FORMAT_VALUE_112_BIT_7_CHANNELS =
+            TagConstantsUtils.createMicrosoftHdPhotoGuidEndingWith((byte)0x2a);
+    public static final BinaryConstant PIXEL_FORMAT_VALUE_128_BIT_8_CHANNELS =
+            TagConstantsUtils.createMicrosoftHdPhotoGuidEndingWith((byte)0x2b);
+    public static final BinaryConstant PIXEL_FORMAT_VALUE_40_BIT_CMYK_ALPHA =
+            TagConstantsUtils.createMicrosoftHdPhotoGuidEndingWith((byte)0x2c);
+    public static final BinaryConstant PIXEL_FORMAT_VALUE_80_BIT_CMYK_ALPHA =
+            TagConstantsUtils.createMicrosoftHdPhotoGuidEndingWith((byte)0x2d);
+    public static final BinaryConstant PIXEL_FORMAT_VALUE_32_BIT_3_CHANNELS_ALPHA =
+            TagConstantsUtils.createMicrosoftHdPhotoGuidEndingWith((byte)0x2e);
+    public static final BinaryConstant PIXEL_FORMAT_VALUE_40_BIT_4_CHANNELS_ALPHA =
+            TagConstantsUtils.createMicrosoftHdPhotoGuidEndingWith((byte)0x2f);
+    public static final BinaryConstant PIXEL_FORMAT_VALUE_48_BIT_5_CHANNELS_ALPHA =
+            TagConstantsUtils.createMicrosoftHdPhotoGuidEndingWith((byte)0x30);
+    public static final BinaryConstant PIXEL_FORMAT_VALUE_56_BIT_6_CHANNELS_ALPHA =
+            TagConstantsUtils.createMicrosoftHdPhotoGuidEndingWith((byte)0x31);
+    public static final BinaryConstant PIXEL_FORMAT_VALUE_64_BIT_7_CHANNELS_ALPHA =
+            TagConstantsUtils.createMicrosoftHdPhotoGuidEndingWith((byte)0x32);
+    public static final BinaryConstant PIXEL_FORMAT_VALUE_72_BIT_8_CHANNELS_ALPHA =
+            TagConstantsUtils.createMicrosoftHdPhotoGuidEndingWith((byte)0x33);
+    public static final BinaryConstant PIXEL_FORMAT_VALUE_64_BIT_3_CHANNELS_ALPHA =
+            TagConstantsUtils.createMicrosoftHdPhotoGuidEndingWith((byte)0x34);
+    public static final BinaryConstant PIXEL_FORMAT_VALUE_80_BIT_4_CHANNELS_ALPHA =
+            TagConstantsUtils.createMicrosoftHdPhotoGuidEndingWith((byte)0x35);
+    public static final BinaryConstant PIXEL_FORMAT_VALUE_96_BIT_5_CHANNELS_ALPHA =
+            TagConstantsUtils.createMicrosoftHdPhotoGuidEndingWith((byte)0x36);
+    public static final BinaryConstant PIXEL_FORMAT_VALUE_112_BIT_6_CHANNELS_ALPHA =
+            TagConstantsUtils.createMicrosoftHdPhotoGuidEndingWith((byte)0x37);
+    public static final BinaryConstant PIXEL_FORMAT_VALUE_128_BIT_7_CHANNELS_ALPHA =
+            TagConstantsUtils.createMicrosoftHdPhotoGuidEndingWith((byte)0x38);
+    public static final BinaryConstant PIXEL_FORMAT_VALUE_144_BIT_8_CHANNELS_ALPHA =
+            TagConstantsUtils.createMicrosoftHdPhotoGuidEndingWith((byte)0x39);
+    public static final BinaryConstant PIXEL_FORMAT_VALUE_64_BIT_RGBA_HALF =
+            TagConstantsUtils.createMicrosoftHdPhotoGuidEndingWith((byte)0x3a);
+    public static final BinaryConstant PIXEL_FORMAT_VALUE_48_BIT_RGB_HALF =
+            TagConstantsUtils.createMicrosoftHdPhotoGuidEndingWith((byte)0x3b);
+    public static final BinaryConstant PIXEL_FORMAT_VALUE_32_BIT_RGBE =
+            TagConstantsUtils.createMicrosoftHdPhotoGuidEndingWith((byte)0x3d);
+    public static final BinaryConstant PIXEL_FORMAT_VALUE_16_BIT_GRAY_HALF =
+            TagConstantsUtils.createMicrosoftHdPhotoGuidEndingWith((byte)0x3e);
+    public static final BinaryConstant PIXEL_FORMAT_VALUE_32_BIT_GRAY_FIXED_POINT =
+            TagConstantsUtils.createMicrosoftHdPhotoGuidEndingWith((byte)0x3f);
+
+    public static final TagInfoLong EXIF_TAG_TRANSFOMATION = new TagInfoLong(
+            "Transfomation", 0xbc02, 1,
+            TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
+    public static final int TRANSFOMATION_VALUE_HORIZONTAL_NORMAL = 0;
+    public static final int TRANSFOMATION_VALUE_MIRROR_VERTICAL = 1;
+    public static final int TRANSFOMATION_VALUE_MIRROR_HORIZONTAL = 2;
+    public static final int TRANSFOMATION_VALUE_ROTATE_180 = 3;
+    public static final int TRANSFOMATION_VALUE_ROTATE_90_CW = 4;
+    public static final int TRANSFOMATION_VALUE_MIRROR_HORIZONTAL_AND_ROTATE_90_CW = 5;
+    public static final int TRANSFOMATION_VALUE_MIRROR_HORIZONTAL_AND_ROTATE_270_CW = 6;
+    public static final int TRANSFOMATION_VALUE_ROTATE_270_CW = 7;
+    
+    public static final TagInfoLong EXIF_TAG_UNCOMPRESSED = new TagInfoLong(
+            "Uncompressed", 0xbc03, 1,
+            TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
+    public static final int UNCOMPRESSED_VALUE_NO = 0;
+    public static final int UNCOMPRESSED_VALUE_YES = 1;
+
+    public static final TagInfoLong EXIF_TAG_IMAGE_TYPE = new TagInfoLong("Image Type",
+            0xbc04, 1, TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
+
+    public static final TagInfoLong EXIF_TAG_IMAGE_WIDTH = new TagInfoLong(
+            "Image Width", 0xbc80, 1,
+            TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
+    
+    public static final TagInfoLong EXIF_TAG_IMAGE_HEIGHT = new TagInfoLong(
+            "Image Height", 0xbc81, 1,
+            TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
+    
+    public static final TagInfoFloat EXIF_TAG_WIDTH_RESOLUTION = new TagInfoFloat(
+            "Width Resolution", 0xbc82, 1,
+            TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
+    
+    public static final TagInfoFloat EXIF_TAG_HEIGHT_RESOLUTION = new TagInfoFloat(
+            "Height Resolution", 0xbc83, 1,
+            TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
+    
+    // FIXME: might be an offset?
+    public static final TagInfoLong EXIF_TAG_IMAGE_OFFSET = new TagInfoLong(
+            "Image Offset", 0xbcc0, 1,
+            TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
+    
+    public static final TagInfoLong EXIF_TAG_IMAGE_BYTE_COUNT = new TagInfoLong(
+            "Image Byte Count", 0xbcc1, 1,
+            TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
+    
+    // FIXME: might be an offset?
+    public static final TagInfoLong EXIF_TAG_ALPHA_OFFSET = new TagInfoLong(
+            "Alpha Offset", 0xbcc2, 1,
+            TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
+    
+    public static final TagInfoLong EXIF_TAG_ALPHA_BYTE_COUNT = new TagInfoLong(
+            "Alpha Byte Count", 0xbcc3, 1,
+            TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
+
+    public static final TagInfoByte EXIF_TAG_IMAGE_DATA_DISCARD = new TagInfoByte(
+            "Image Data Discard", 0xbcc4, 1,
+            TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
+    public static final int IMAGE_DATA_DISCARD_VALUE_FULL_RESOLUTION = 0;
+    public static final int IMAGE_DATA_DISCARD_VALUE_FLEXBITS_DISCARDED = 1;
+    public static final int IMAGE_DATA_DISCARD_VALUE_HIGH_PASS_FREQUENCY_DATA_DISCARDED =
2;
+    public static final int IMAGE_DATA_DISCARD_VALUE_HIGHPASS_AND_LOW_PASS_FREQUENCY_DATA_DISCARDED
= 3;
+
+    public static final TagInfoByte EXIF_TAG_ALPHA_DATA_DISCARD = new TagInfoByte(
+            "Alpha Data Discard", 0xbcc5, 1,
+            TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
+    public static final int ALPHA_DATA_DISCARD_VALUE_FULL_RESOLUTION = 0;
+    public static final int ALPHA_DATA_DISCARD_VALUE_FLEXBITS_DISCARDED = 1;
+    public static final int ALPHA_DATA_DISCARD_VALUE_HIGH_PASS_FREQUENCY_DATA_DISCARDED =
2;
+    public static final int ALPHA_DATA_DISCARD_VALUE_HIGHPASS_AND_LOW_PASS_FREQUENCY_DATA_DISCARDED
= 3;
+
+    public static final TagInfoUndefined EXIF_TAG_PADDING = new TagInfoUndefined(
+            "Padding", 0xea1c, -1,
+            TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
+    
+    public static final List<TagInfo> ALL_MICROSOFT_HD_PHOTO_TAGS =
+            Collections.unmodifiableList(Arrays.asList(
+                    EXIF_TAG_PIXEL_FORMAT,
+                    EXIF_TAG_TRANSFOMATION,
+                    EXIF_TAG_UNCOMPRESSED,
+                    EXIF_TAG_IMAGE_TYPE,
+                    EXIF_TAG_IMAGE_WIDTH,
+                    EXIF_TAG_IMAGE_HEIGHT,
+                    EXIF_TAG_WIDTH_RESOLUTION,
+                    EXIF_TAG_HEIGHT_RESOLUTION,
+                    EXIF_TAG_IMAGE_OFFSET,
+                    EXIF_TAG_IMAGE_BYTE_COUNT,
+                    EXIF_TAG_ALPHA_OFFSET,
+                    EXIF_TAG_ALPHA_BYTE_COUNT,
+                    EXIF_TAG_IMAGE_DATA_DISCARD,
+                    EXIF_TAG_ALPHA_DATA_DISCARD,
+                    EXIF_TAG_PADDING));
+}

Propchange: commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/MicrosoftHdPhotoTagConstants.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/MolecularDynamicsGelTagConstants.java
URL: http://svn.apache.org/viewvc/commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/MolecularDynamicsGelTagConstants.java?rev=1304789&r1=1304788&r2=1304789&view=diff
==============================================================================
--- commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/MolecularDynamicsGelTagConstants.java
(original)
+++ commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/MolecularDynamicsGelTagConstants.java
Sat Mar 24 13:33:40 2012
@@ -10,6 +10,11 @@ import org.apache.commons.sanselan.forma
 import org.apache.commons.sanselan.formats.tiff.taginfos.TagInfoRational;
 import org.apache.commons.sanselan.formats.tiff.taginfos.TagInfoShort;
 
+/**
+ * Molecular Dynamics GEL file format
+ * <BR>  
+ * http://www.awaresystems.be/imaging/tiff/tifftags/docs/gel.html
+ */
 public interface MolecularDynamicsGelTagConstants extends TiffFieldTypeConstants {
     public static final TagInfoLong EXIF_TAG_MDFILE_TAG = new TagInfoLong(
             "MDFile Tag", 0x82a5, 1,

Modified: commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/TagConstantsUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/TagConstantsUtils.java?rev=1304789&r1=1304788&r2=1304789&view=diff
==============================================================================
--- commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/TagConstantsUtils.java
(original)
+++ commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/TagConstantsUtils.java
Sat Mar 24 13:33:40 2012
@@ -19,6 +19,7 @@ package org.apache.commons.sanselan.form
 import java.util.ArrayList;
 import java.util.List;
 
+import org.apache.commons.sanselan.common.BinaryConstant;
 import org.apache.commons.sanselan.formats.tiff.taginfos.TagInfo;
 
 public class TagConstantsUtils implements TiffDirectoryConstants
@@ -51,5 +52,13 @@ public class TagConstantsUtils implement
                 return tiffDirectoryTypes[i];
         return TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN;
     }
+    
+    public static BinaryConstant createMicrosoftHdPhotoGuidEndingWith(byte end) {
+        return new BinaryConstant(new byte[] {
+                (byte)0x24, (byte)0xC3, (byte)0xDD, (byte)0x6F,
+                (byte)0x03, (byte)0x4E,
+                (byte)0xFE, (byte)0x4B,
+                (byte)0xB1, (byte)0x85, (byte)0x3D, (byte)0x77, (byte)0x76, (byte)0x8D, (byte)0xC9,
end});
+    }
 
 }
\ No newline at end of file

Modified: commons/proper/sanselan/trunk/src/test/java/org/apache/commons/sanselan/formats/tiff/TiffTagIntegrityTest.java
URL: http://svn.apache.org/viewvc/commons/proper/sanselan/trunk/src/test/java/org/apache/commons/sanselan/formats/tiff/TiffTagIntegrityTest.java?rev=1304789&r1=1304788&r2=1304789&view=diff
==============================================================================
--- commons/proper/sanselan/trunk/src/test/java/org/apache/commons/sanselan/formats/tiff/TiffTagIntegrityTest.java
(original)
+++ commons/proper/sanselan/trunk/src/test/java/org/apache/commons/sanselan/formats/tiff/TiffTagIntegrityTest.java
Sat Mar 24 13:33:40 2012
@@ -25,6 +25,7 @@ import org.apache.commons.sanselan.forma
 import org.apache.commons.sanselan.formats.tiff.constants.DcfTagConstants;
 import org.apache.commons.sanselan.formats.tiff.constants.ExifTagConstants;
 import org.apache.commons.sanselan.formats.tiff.constants.GpsTagConstants;
+import org.apache.commons.sanselan.formats.tiff.constants.MicrosoftHdPhotoTagConstants;
 import org.apache.commons.sanselan.formats.tiff.constants.MicrosoftTagConstants;
 import org.apache.commons.sanselan.formats.tiff.constants.MolecularDynamicsGelTagConstants;
 import org.apache.commons.sanselan.formats.tiff.constants.Rfc2301TagConstants;
@@ -43,6 +44,7 @@ public class TiffTagIntegrityTest extend
         verifyFields(GpsTagConstants.class, GpsTagConstants.ALL_GPS_TAGS);
         verifyFields(MolecularDynamicsGelTagConstants.class, MolecularDynamicsGelTagConstants.ALL_MOLECULAR_DYNAMICS_GEL_TAGS);
         verifyFields(MicrosoftTagConstants.class, MicrosoftTagConstants.ALL_MICROSOFT_TAGS);
+        verifyFields(MicrosoftHdPhotoTagConstants.class, MicrosoftHdPhotoTagConstants.ALL_MICROSOFT_HD_PHOTO_TAGS);
         verifyFields(Rfc2301TagConstants.class, Rfc2301TagConstants.ALL_RFC_2301_TAGS);
         verifyFields(Tiff4TagConstants.class, Tiff4TagConstants.ALL_TIFF_4_TAGS);
         verifyFields(TiffEpTagConstants.class, TiffEpTagConstants.ALL_TIFF_EP_TAGS);



Mime
View raw message