Package org.apache.sanselan.formats.tiff.constants

Examples of org.apache.sanselan.formats.tiff.constants.TagInfo


    ImageDataOffsets imageDataInfo = null;
    if (null != tiffImageData)
    {
      boolean stripsNotTiles = tiffImageData.stripsNotTiles();

      TagInfo offsetTag;
      TagInfo byteCountsTag;
      if (stripsNotTiles)
      {
        offsetTag = TIFF_TAG_STRIP_OFFSETS;
        byteCountsTag = TIFF_TAG_STRIP_BYTE_COUNTS;
      } else
View Full Code Here


                    {
                        // ignore offset fields.
                        continue;
                    }

                    TagInfo tagInfo = srcField.tagInfo;
                    FieldType fieldType = srcField.fieldType;
                    int count = srcField.length;
                    //            byte bytes[] = srcField.fieldType.getRawBytes(srcField);

                    //                    Debug.debug("tagInfo", tagInfo);

                    Object value = srcField.getValue();

                    //                    Debug.debug("value", Debug.getType(value));

                    byte bytes[] = tagInfo.encodeValue(fieldType, value,
                            byteOrder);

                    //                    if (tagInfo.isUnknown())
                    //                        Debug.debug(
                    //                                "\t" + "unknown tag(0x"
View Full Code Here

        ImageDataOffsets imageDataInfo = null;
        if (null != tiffImageData)
        {
            boolean stripsNotTiles = tiffImageData.stripsNotTiles();

            TagInfo offsetTag;
            TagInfo byteCountsTag;
            if (stripsNotTiles)
            {
                offsetTag = TIFF_TAG_STRIP_OFFSETS;
                byteCountsTag = TIFF_TAG_STRIP_BYTE_COUNTS;
            } else
View Full Code Here

                    {
                        // ignore offset fields.
                        continue;
                    }

                    TagInfo tagInfo = srcField.tagInfo;
                    FieldType fieldType = srcField.fieldType;
                    int count = srcField.length;
                    //            byte bytes[] = srcField.fieldType.getRawBytes(srcField);

                    //                    Debug.debug("tagInfo", tagInfo);

                    Object value = srcField.getValue();

                    //                    Debug.debug("value", Debug.getType(value));

                    byte bytes[] = tagInfo.encodeValue(fieldType, value,
                            byteOrder);

                    //                    if (tagInfo.isUnknown())
                    //                        Debug.debug(
                    //                                "\t" + "unknown tag(0x"
View Full Code Here

        // }

        // first search for exact match.
        for (int i = 0; i < possibleMatches.size(); i++)
        {
            TagInfo tagInfo = (TagInfo) possibleMatches.get(i);
            if (tagInfo.directoryType == EXIF_DIRECTORY_UNKNOWN)
                // pass
                continue;
            else if (directoryType == DIRECTORY_TYPE_EXIF
                    && tagInfo.directoryType == EXIF_DIRECTORY_EXIF_IFD)
                return tagInfo;
            else if (directoryType == DIRECTORY_TYPE_INTEROPERABILITY
                    && tagInfo.directoryType == EXIF_DIRECTORY_INTEROP_IFD)
                return tagInfo;
            else if (directoryType == DIRECTORY_TYPE_GPS
                    && tagInfo.directoryType == EXIF_DIRECTORY_GPS)
                return tagInfo;
            else if (directoryType == DIRECTORY_TYPE_MAKER_NOTES
                    && tagInfo.directoryType == EXIF_DIRECTORY_MAKER_NOTES)
                return tagInfo;
            else if (directoryType == DIRECTORY_TYPE_DIR_0
                    && tagInfo.directoryType == TIFF_DIRECTORY_IFD0)
                return tagInfo;
            else if (directoryType == DIRECTORY_TYPE_DIR_1
                    && tagInfo.directoryType == TIFF_DIRECTORY_IFD1)
                return tagInfo;
            else if (directoryType == DIRECTORY_TYPE_DIR_2
                    && tagInfo.directoryType == TIFF_DIRECTORY_IFD2)
                return tagInfo;
            else if (directoryType == DIRECTORY_TYPE_DIR_3
                    && tagInfo.directoryType == TIFF_DIRECTORY_IFD3)
                return tagInfo;
        }

        // accept an inexact match.
        for (int i = 0; i < possibleMatches.size(); i++)
        {
            TagInfo tagInfo = (TagInfo) possibleMatches.get(i);

            if (tagInfo.directoryType == EXIF_DIRECTORY_UNKNOWN)
                // pass
                continue;
            else if (directoryType >= 0
                    && tagInfo.directoryType.isImageDirectory())
                return tagInfo;
            else if (directoryType < 0
                    && !tagInfo.directoryType.isImageDirectory())
                return tagInfo;
        }

        // accept a wildcard match.
        for (int i = 0; i < possibleMatches.size(); i++)
        {
            TagInfo tagInfo = (TagInfo) possibleMatches.get(i);

            if (tagInfo.directoryType == EXIF_DIRECTORY_UNKNOWN)
                return tagInfo;
        }
View Full Code Here

        if (null == possibleMatches)
        {
            return TIFF_TAG_UNKNOWN;
        }

        TagInfo result = getTag(directoryType, tag, possibleMatches);
        return result;
    }
View Full Code Here

        // make sure to use the thread-safe version; this is shared state.
        Map map = new Hashtable();

        for (int i = 0; i < tags.length; i++)
        {
            TagInfo tag = tags[i];
            Object key = new Integer(tag.tag);

            List tagList = (List) map.get(key);
            if (tagList == null)
            {
View Full Code Here

TOP

Related Classes of org.apache.sanselan.formats.tiff.constants.TagInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.