+2009-09-29 Dan Fandrich <dan@coneharvesters.com>
+
+ * Added EXIF_DATA_TYPE_UNKNOWN as a backwards-compatible
+ replacement for most uses of EXIF_DATA_TYPE_COUNT since that's
+ a clearer name for how it's being used.
+
2009-09-26 Dan Fandrich <dan@coneharvesters.com>
* libexif/exif-data.c: Added more error log messages and improved
extern "C" {
#endif /* __cplusplus */
+/*! Represents the type of image data to which the EXIF data applies.
+ * The EXIF tags have different constraints depending on the type of
+ * image data.
+ */
typedef enum {
EXIF_DATA_TYPE_UNCOMPRESSED_CHUNKY = 0,
EXIF_DATA_TYPE_UNCOMPRESSED_PLANAR,
EXIF_DATA_TYPE_UNCOMPRESSED_YCC,
EXIF_DATA_TYPE_COMPRESSED,
- EXIF_DATA_TYPE_COUNT
+ EXIF_DATA_TYPE_COUNT,
+
+ EXIF_DATA_TYPE_UNKNOWN = EXIF_DATA_TYPE_COUNT
} ExifDataType;
#ifdef __cplusplus
ExifDataType
exif_data_get_data_type (ExifData *d)
{
- return (d && d->priv) ? d->priv->data_type : EXIF_DATA_TYPE_COUNT;
+ return (d && d->priv) ? d->priv->data_type : EXIF_DATA_TYPE_UNKNOWN;
}
};
/*! Allocate a new #ExifData. The #ExifData contains an empty
- * #ExifContent for each IFD and the default set of options.
+ * #ExifContent for each IFD and the default set of options,
+ * which has #EXIF_DATA_OPTION_IGNORE_UNKNOWN_TAGS
+ * and #EXIF_DATA_OPTION_FOLLOW_SPECIFICATION set.
*
* \return allocated #ExifData, or NULL on error
*/
/*! Allocate a new #ExifData using the given memory allocator.
* The #ExifData contains an empty #ExifContent for each IFD and the default
- * set of options.
+ * set of options, which has #EXIF_DATA_OPTION_IGNORE_UNKNOWN_TAGS and
+ * #EXIF_DATA_OPTION_FOLLOW_SPECIFICATION set.
*
* \return allocated #ExifData, or NULL on error
*/
/*! Return the data type for the given #ExifData.
*
* \param[in] d EXIF data
- * \return data type, or #EXIF_DATA_TYPE_COUNT on error
+ * \return data type, or #EXIF_DATA_TYPE_UNKNOWN on error
*/
ExifDataType exif_data_get_data_type (ExifData *d);
*
* \param[in] tag EXIF tag
* \param[in] ifd a valid IFD (not EXIF_IFD_COUNT)
- * \param[in] t a valid data type (not EXIF_DATA_TYPE_COUNT)
+ * \param[in] t a valid data type (not EXIF_DATA_TYPE_UNKNOWN)
* \return the level of support for this tag
*/
static inline ExifSupportLevel
/*! Return whether the given tag is mandatory or not in the given IFD and
* data type according to the EXIF specification. If the IFD given is
* EXIF_IFD_COUNT, the result is EXIF_SUPPORT_LEVEL_UNKNOWN. If the data
- * type is EXIF_DATA_TYPE_COUNT, the result is
+ * type is EXIF_DATA_TYPE_UNKNOWN, the result is
* EXIF_SUPPORT_LEVEL_UNKNOWN unless the support level is the same for
* all data types.
*
* \param[in] tag EXIF tag
* \param[in] ifd IFD or EXIF_IFD_COUNT
- * \param[in] t data type or EXIF_DATA_TYPE_COUNT
+ * \param[in] t data type or EXIF_DATA_TYPE_UNKNOWN
* \return the level of support for this tag
*/
ExifSupportLevel exif_tag_get_support_level_in_ifd (ExifTag tag, ExifIfd ifd,