WIP - add extractor, generate snippet_data
This commit is contained in:
2
node_modules/sharp/vendor/include/libexif/_stdint.h
generated
vendored
Normal file
2
node_modules/sharp/vendor/include/libexif/_stdint.h
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
/* This file is generated automatically by configure */
|
||||
#include <stdint.h>
|
||||
48
node_modules/sharp/vendor/include/libexif/exif-byte-order.h
generated
vendored
Normal file
48
node_modules/sharp/vendor/include/libexif/exif-byte-order.h
generated
vendored
Normal file
@ -0,0 +1,48 @@
|
||||
/*! \file exif-byte-order.h
|
||||
* \brief Defines the ExifByteOrder enum and the associated functions.
|
||||
*/
|
||||
/*
|
||||
* Copyright (c) 2002 Lutz Mueller <lutz@users.sourceforge.net>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#ifndef __EXIF_BYTE_ORDER_H__
|
||||
#define __EXIF_BYTE_ORDER_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/*! Which byte order to use */
|
||||
typedef enum {
|
||||
/*! Big-endian byte order */
|
||||
EXIF_BYTE_ORDER_MOTOROLA,
|
||||
/*! Little-endian byte order */
|
||||
EXIF_BYTE_ORDER_INTEL
|
||||
} ExifByteOrder;
|
||||
|
||||
/*! Return a short, localized, textual name for the given byte order.
|
||||
* \param[in] order byte order
|
||||
* \return localized textual name of the byte order
|
||||
*/
|
||||
const char *exif_byte_order_get_name (ExifByteOrder order);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __EXIF_BYTE_ORDER_H__ */
|
||||
145
node_modules/sharp/vendor/include/libexif/exif-content.h
generated
vendored
Normal file
145
node_modules/sharp/vendor/include/libexif/exif-content.h
generated
vendored
Normal file
@ -0,0 +1,145 @@
|
||||
/*! \file exif-content.h
|
||||
* \brief Handling EXIF IFDs
|
||||
*/
|
||||
/*
|
||||
* Copyright (c) 2001 Lutz Mueller <lutz@users.sourceforge.net>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#ifndef __EXIF_CONTENT_H__
|
||||
#define __EXIF_CONTENT_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/*! Holds all EXIF tags in a single IFD */
|
||||
typedef struct _ExifContent ExifContent;
|
||||
typedef struct _ExifContentPrivate ExifContentPrivate;
|
||||
|
||||
#include <libexif/exif-tag.h>
|
||||
#include <libexif/exif-entry.h>
|
||||
#include <libexif/exif-data.h>
|
||||
#include <libexif/exif-log.h>
|
||||
#include <libexif/exif-mem.h>
|
||||
|
||||
struct _ExifContent
|
||||
{
|
||||
ExifEntry **entries;
|
||||
unsigned int count;
|
||||
|
||||
/*! Data containing this content */
|
||||
ExifData *parent;
|
||||
|
||||
ExifContentPrivate *priv;
|
||||
};
|
||||
|
||||
/* Lifecycle */
|
||||
ExifContent *exif_content_new (void);
|
||||
ExifContent *exif_content_new_mem (ExifMem *);
|
||||
void exif_content_ref (ExifContent *content);
|
||||
void exif_content_unref (ExifContent *content);
|
||||
void exif_content_free (ExifContent *content);
|
||||
|
||||
/*! Add an EXIF tag to an IFD.
|
||||
* If this tag already exists in the IFD, this function does nothing.
|
||||
* \pre The "tag" member of the entry must be set on entry.
|
||||
*
|
||||
* \param[out] c IFD
|
||||
* \param[in] entry EXIF entry to add
|
||||
*/
|
||||
void exif_content_add_entry (ExifContent *c, ExifEntry *entry);
|
||||
|
||||
/*! Remove an EXIF tag from an IFD.
|
||||
* If this tag does not exist in the IFD, this function does nothing.
|
||||
*
|
||||
* \param[out] c IFD
|
||||
* \param[in] e EXIF entry to remove
|
||||
*/
|
||||
void exif_content_remove_entry (ExifContent *c, ExifEntry *e);
|
||||
|
||||
/*! Return the #ExifEntry in this IFD corresponding to the given tag.
|
||||
* This is a pointer into a member of the #ExifContent array and must NOT be
|
||||
* freed or unrefed by the caller.
|
||||
*
|
||||
* \param[in] content EXIF content for an IFD
|
||||
* \param[in] tag EXIF tag to return
|
||||
* \return #ExifEntry of the tag, or NULL on error
|
||||
*/
|
||||
ExifEntry *exif_content_get_entry (ExifContent *content, ExifTag tag);
|
||||
|
||||
/*! Fix the IFD to bring it into specification. Call #exif_entry_fix on
|
||||
* each entry in this IFD to fix existing entries, create any new entries
|
||||
* that are mandatory in this IFD but do not yet exist, and remove any
|
||||
* entries that are not allowed in this IFD.
|
||||
*
|
||||
* \param[in,out] c EXIF content for an IFD
|
||||
*/
|
||||
void exif_content_fix (ExifContent *c);
|
||||
|
||||
typedef void (* ExifContentForeachEntryFunc) (ExifEntry *, void *user_data);
|
||||
|
||||
/*! Executes function on each EXIF tag in this IFD in turn.
|
||||
* The tags will not necessarily be visited in numerical order.
|
||||
*
|
||||
* \param[in,out] content IFD over which to iterate
|
||||
* \param[in] func function to call for each entry
|
||||
* \param[in] user_data data to pass into func on each call
|
||||
*/
|
||||
void exif_content_foreach_entry (ExifContent *content,
|
||||
ExifContentForeachEntryFunc func,
|
||||
void *user_data);
|
||||
|
||||
/*! Return the IFD number in which the given #ExifContent is found.
|
||||
*
|
||||
* \param[in] c an #ExifContent*
|
||||
* \return IFD number, or #EXIF_IFD_COUNT on error
|
||||
*/
|
||||
ExifIfd exif_content_get_ifd (ExifContent *c);
|
||||
|
||||
/*! Return a textual representation of the EXIF data for a tag.
|
||||
*
|
||||
* \param[in] c #ExifContent* for an IFD
|
||||
* \param[in] t #ExifTag to return
|
||||
* \param[out] v char* buffer in which to store value
|
||||
* \param[in] m unsigned int length of the buffer v
|
||||
* \return the v pointer, or NULL on error
|
||||
*/
|
||||
#define exif_content_get_value(c,t,v,m) \
|
||||
(exif_content_get_entry (c,t) ? \
|
||||
exif_entry_get_value (exif_content_get_entry (c,t),v,m) : NULL)
|
||||
|
||||
/*! Dump contents of the IFD to stdout.
|
||||
* This is intended for diagnostic purposes only.
|
||||
*
|
||||
* \param[in] content IFD data
|
||||
* \param[in] indent how many levels deep to indent the data
|
||||
*/
|
||||
void exif_content_dump (ExifContent *content, unsigned int indent);
|
||||
|
||||
/*! Set the log message object for this IFD.
|
||||
*
|
||||
* \param[in] content IFD
|
||||
* \param[in] log #ExifLog*
|
||||
*/
|
||||
void exif_content_log (ExifContent *content, ExifLog *log);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __EXIF_CONTENT_H__ */
|
||||
46
node_modules/sharp/vendor/include/libexif/exif-data-type.h
generated
vendored
Normal file
46
node_modules/sharp/vendor/include/libexif/exif-data-type.h
generated
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
/* exif-data-tag.h
|
||||
*
|
||||
* Copyright (c) 2005 Lutz Mueller <lutz@users.sourceforge.net>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#ifndef __EXIF_DATA_TYPE_H__
|
||||
#define __EXIF_DATA_TYPE_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
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_UNKNOWN = EXIF_DATA_TYPE_COUNT
|
||||
} ExifDataType;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __EXIF_TAG_H__ */
|
||||
265
node_modules/sharp/vendor/include/libexif/exif-data.h
generated
vendored
Normal file
265
node_modules/sharp/vendor/include/libexif/exif-data.h
generated
vendored
Normal file
@ -0,0 +1,265 @@
|
||||
/*! \file exif-data.h
|
||||
* \brief Defines the ExifData type and the associated functions.
|
||||
*/
|
||||
/*
|
||||
* \author Lutz Mueller <lutz@users.sourceforge.net>
|
||||
* \date 2001-2005
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#ifndef __EXIF_DATA_H__
|
||||
#define __EXIF_DATA_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include <libexif/exif-byte-order.h>
|
||||
#include <libexif/exif-data-type.h>
|
||||
#include <libexif/exif-ifd.h>
|
||||
#include <libexif/exif-log.h>
|
||||
#include <libexif/exif-tag.h>
|
||||
|
||||
/*! Represents the entire EXIF data found in an image */
|
||||
typedef struct _ExifData ExifData;
|
||||
typedef struct _ExifDataPrivate ExifDataPrivate;
|
||||
|
||||
#include <libexif/exif-content.h>
|
||||
#include <libexif/exif-mnote-data.h>
|
||||
#include <libexif/exif-mem.h>
|
||||
|
||||
/*! Represents the entire EXIF data found in an image */
|
||||
struct _ExifData
|
||||
{
|
||||
/*! Data for each IFD */
|
||||
ExifContent *ifd[EXIF_IFD_COUNT];
|
||||
|
||||
/*! Pointer to thumbnail image, or NULL if not available */
|
||||
unsigned char *data;
|
||||
|
||||
/*! Number of bytes in thumbnail image at \c data */
|
||||
unsigned int size;
|
||||
|
||||
ExifDataPrivate *priv;
|
||||
};
|
||||
|
||||
/*! Allocate a new #ExifData. The #ExifData contains an empty
|
||||
* #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
|
||||
*/
|
||||
ExifData *exif_data_new (void);
|
||||
|
||||
/*! Allocate a new #ExifData using the given memory allocator.
|
||||
* The #ExifData contains an empty #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
|
||||
*/
|
||||
ExifData *exif_data_new_mem (ExifMem *);
|
||||
|
||||
/*! Allocate a new #ExifData and load EXIF data from a JPEG file.
|
||||
* Uses an #ExifLoader internally to do the loading.
|
||||
*
|
||||
* \param[in] path filename including path
|
||||
* \return allocated #ExifData, or NULL on error
|
||||
*/
|
||||
ExifData *exif_data_new_from_file (const char *path);
|
||||
|
||||
/*! Allocate a new #ExifData and load EXIF data from a memory buffer.
|
||||
*
|
||||
* \param[in] data pointer to raw JPEG or EXIF data
|
||||
* \param[in] size number of bytes of data at data
|
||||
* \return allocated #ExifData, or NULL on error
|
||||
*/
|
||||
ExifData *exif_data_new_from_data (const unsigned char *data,
|
||||
unsigned int size);
|
||||
|
||||
/*! Load the #ExifData structure from the raw JPEG or EXIF data in the given
|
||||
* memory buffer. If the EXIF data contains a recognized MakerNote, it is
|
||||
* loaded and stored as well for later retrieval by #exif_data_get_mnote_data.
|
||||
* If the #EXIF_DATA_OPTION_FOLLOW_SPECIFICATION option has been set on this
|
||||
* #ExifData, then the tags are automatically fixed after loading (by calling
|
||||
* #exif_data_fix).
|
||||
*
|
||||
* \param[in,out] data EXIF data
|
||||
* \param[in] d pointer to raw JPEG or EXIF data
|
||||
* \param[in] size number of bytes of data at d
|
||||
*/
|
||||
void exif_data_load_data (ExifData *data, const unsigned char *d,
|
||||
unsigned int size);
|
||||
|
||||
/*! Store raw EXIF data representing the #ExifData structure into a memory
|
||||
* buffer. The buffer is allocated by this function and must subsequently be
|
||||
* freed by the caller using the matching free function as used by the #ExifMem
|
||||
* in use by this #ExifData.
|
||||
*
|
||||
* \param[in] data EXIF data
|
||||
* \param[out] d pointer to buffer pointer containing raw EXIF data on return
|
||||
* \param[out] ds pointer to variable to hold the number of bytes of
|
||||
* data at d, or set to 0 on error
|
||||
*/
|
||||
void exif_data_save_data (ExifData *data, unsigned char **d,
|
||||
unsigned int *ds);
|
||||
|
||||
void exif_data_ref (ExifData *data);
|
||||
void exif_data_unref (ExifData *data);
|
||||
void exif_data_free (ExifData *data);
|
||||
|
||||
/*! Return the byte order in use by this EXIF structure.
|
||||
*
|
||||
* \param[in] data EXIF data
|
||||
* \return byte order
|
||||
*/
|
||||
ExifByteOrder exif_data_get_byte_order (ExifData *data);
|
||||
|
||||
/*! Set the byte order to use for this EXIF data. If any tags already exist
|
||||
* (including MakerNote tags) they are are converted to the specified byte
|
||||
* order.
|
||||
*
|
||||
* \param[in,out] data EXIF data
|
||||
* \param[in] order byte order
|
||||
*/
|
||||
void exif_data_set_byte_order (ExifData *data, ExifByteOrder order);
|
||||
|
||||
/*! Return the MakerNote data out of the EXIF data. Only certain
|
||||
* MakerNote formats that are recognized by libexif are supported.
|
||||
* The pointer references a member of the #ExifData structure and must NOT be
|
||||
* freed by the caller.
|
||||
*
|
||||
* \param[in] d EXIF data
|
||||
* \return MakerNote data, or NULL if not found or not supported
|
||||
*/
|
||||
ExifMnoteData *exif_data_get_mnote_data (ExifData *d);
|
||||
|
||||
/*! Fix the EXIF data to bring it into specification. Call #exif_content_fix
|
||||
* on each IFD to fix existing entries, create any new entries that are
|
||||
* mandatory but do not yet exist, and remove any entries that are not
|
||||
* allowed.
|
||||
*
|
||||
* \param[in,out] d EXIF data
|
||||
*/
|
||||
void exif_data_fix (ExifData *d);
|
||||
|
||||
typedef void (* ExifDataForeachContentFunc) (ExifContent *, void *user_data);
|
||||
|
||||
/*! Execute a function on each IFD in turn.
|
||||
*
|
||||
* \param[in] data EXIF data over which to iterate
|
||||
* \param[in] func function to call for each entry
|
||||
* \param[in] user_data data to pass into func on each call
|
||||
*/
|
||||
void exif_data_foreach_content (ExifData *data,
|
||||
ExifDataForeachContentFunc func,
|
||||
void *user_data);
|
||||
|
||||
/*! Options to configure the behaviour of #ExifData */
|
||||
typedef enum {
|
||||
/*! Act as though unknown tags are not present */
|
||||
EXIF_DATA_OPTION_IGNORE_UNKNOWN_TAGS = 1 << 0,
|
||||
|
||||
/*! Fix the EXIF tags to follow the spec */
|
||||
EXIF_DATA_OPTION_FOLLOW_SPECIFICATION = 1 << 1,
|
||||
|
||||
/*! Leave the MakerNote alone, which could cause it to be corrupted */
|
||||
EXIF_DATA_OPTION_DONT_CHANGE_MAKER_NOTE = 1 << 2
|
||||
} ExifDataOption;
|
||||
|
||||
/*! Return a short textual description of the given #ExifDataOption.
|
||||
*
|
||||
* \param[in] o option
|
||||
* \return localized textual description of the option
|
||||
*/
|
||||
const char *exif_data_option_get_name (ExifDataOption o);
|
||||
|
||||
/*! Return a verbose textual description of the given #ExifDataOption.
|
||||
*
|
||||
* \param[in] o option
|
||||
* \return verbose localized textual description of the option
|
||||
*/
|
||||
const char *exif_data_option_get_description (ExifDataOption o);
|
||||
|
||||
/*! Set the given option on the given #ExifData.
|
||||
*
|
||||
* \param[in] d EXIF data
|
||||
* \param[in] o option
|
||||
*/
|
||||
void exif_data_set_option (ExifData *d, ExifDataOption o);
|
||||
|
||||
/*! Clear the given option on the given #ExifData.
|
||||
*
|
||||
* \param[in] d EXIF data
|
||||
* \param[in] o option
|
||||
*/
|
||||
void exif_data_unset_option (ExifData *d, ExifDataOption o);
|
||||
|
||||
/*! Set the data type for the given #ExifData.
|
||||
*
|
||||
* \param[in] d EXIF data
|
||||
* \param[in] dt data type
|
||||
*/
|
||||
void exif_data_set_data_type (ExifData *d, ExifDataType dt);
|
||||
|
||||
/*! Return the data type for the given #ExifData.
|
||||
*
|
||||
* \param[in] d EXIF data
|
||||
* \return data type, or #EXIF_DATA_TYPE_UNKNOWN on error
|
||||
*/
|
||||
ExifDataType exif_data_get_data_type (ExifData *d);
|
||||
|
||||
/*! Dump all EXIF data to stdout.
|
||||
* This is intended for diagnostic purposes only.
|
||||
*
|
||||
* \param[in] data EXIF data
|
||||
*/
|
||||
void exif_data_dump (ExifData *data);
|
||||
|
||||
/*! Set the log message object for all IFDs.
|
||||
*
|
||||
* \param[in] data EXIF data
|
||||
* \param[in] log #ExifLog
|
||||
*/
|
||||
void exif_data_log (ExifData *data, ExifLog *log);
|
||||
|
||||
/*! Return an #ExifEntry for the given tag if found in any IFD.
|
||||
* Each IFD is searched in turn and the first containing a tag with
|
||||
* this number is returned.
|
||||
*
|
||||
* \param[in] d #ExifData
|
||||
* \param[in] t #ExifTag
|
||||
* \return #ExifEntry* if found, else NULL if not found
|
||||
*/
|
||||
#define exif_data_get_entry(d,t) \
|
||||
(exif_content_get_entry(d->ifd[EXIF_IFD_0],t) ? \
|
||||
exif_content_get_entry(d->ifd[EXIF_IFD_0],t) : \
|
||||
exif_content_get_entry(d->ifd[EXIF_IFD_1],t) ? \
|
||||
exif_content_get_entry(d->ifd[EXIF_IFD_1],t) : \
|
||||
exif_content_get_entry(d->ifd[EXIF_IFD_EXIF],t) ? \
|
||||
exif_content_get_entry(d->ifd[EXIF_IFD_EXIF],t) : \
|
||||
exif_content_get_entry(d->ifd[EXIF_IFD_GPS],t) ? \
|
||||
exif_content_get_entry(d->ifd[EXIF_IFD_GPS],t) : \
|
||||
exif_content_get_entry(d->ifd[EXIF_IFD_INTEROPERABILITY],t) ? \
|
||||
exif_content_get_entry(d->ifd[EXIF_IFD_INTEROPERABILITY],t) : NULL)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __EXIF_DATA_H__ */
|
||||
185
node_modules/sharp/vendor/include/libexif/exif-entry.h
generated
vendored
Normal file
185
node_modules/sharp/vendor/include/libexif/exif-entry.h
generated
vendored
Normal file
@ -0,0 +1,185 @@
|
||||
/*! \file exif-entry.h
|
||||
* \brief Handling EXIF entries
|
||||
*/
|
||||
/*
|
||||
* Copyright (c) 2001 Lutz Mueller <lutz@users.sourceforge.net>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#ifndef __EXIF_ENTRY_H__
|
||||
#define __EXIF_ENTRY_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/*! Data found in one EXIF tag.
|
||||
* The #exif_entry_get_value function can provide access to the
|
||||
* formatted contents, or the struct members can be used directly to
|
||||
* access the raw contents.
|
||||
*/
|
||||
typedef struct _ExifEntry ExifEntry;
|
||||
typedef struct _ExifEntryPrivate ExifEntryPrivate;
|
||||
|
||||
#include <libexif/exif-content.h>
|
||||
#include <libexif/exif-format.h>
|
||||
#include <libexif/exif-mem.h>
|
||||
|
||||
/*! Data found in one EXIF tag */
|
||||
struct _ExifEntry {
|
||||
/*! EXIF tag for this entry */
|
||||
ExifTag tag;
|
||||
|
||||
/*! Type of data in this entry */
|
||||
ExifFormat format;
|
||||
|
||||
/*! Number of elements in the array, if this is an array entry.
|
||||
* Contains 1 for non-array data types. */
|
||||
unsigned long components;
|
||||
|
||||
/*! Pointer to the raw EXIF data for this entry. It is allocated
|
||||
* by #exif_entry_initialize and is NULL beforehand. Data contained
|
||||
* here may be manipulated using the functions in exif-utils.h */
|
||||
unsigned char *data;
|
||||
|
||||
/*! Number of bytes in the buffer at \c data. This must be no less
|
||||
* than exif_format_get_size(format)*components */
|
||||
unsigned int size;
|
||||
|
||||
/*! #ExifContent containing this entry.
|
||||
* \see exif_entry_get_ifd */
|
||||
ExifContent *parent;
|
||||
|
||||
/*! Internal data to be used by libexif itself */
|
||||
ExifEntryPrivate *priv;
|
||||
};
|
||||
|
||||
/* Lifecycle */
|
||||
|
||||
/*! Reserve memory for and initialize a new #ExifEntry.
|
||||
* No memory is allocated for the \c data element of the returned #ExifEntry.
|
||||
*
|
||||
* \return new allocated #ExifEntry, or NULL on error
|
||||
*
|
||||
* \see exif_entry_new_mem, exif_entry_unref
|
||||
*/
|
||||
ExifEntry *exif_entry_new (void);
|
||||
|
||||
/*! Reserve memory for and initialize new #ExifEntry using the specified
|
||||
* memory allocator.
|
||||
* No memory is allocated for the \c data element of the returned #ExifEntry.
|
||||
*
|
||||
* \return new allocated #ExifEntry, or NULL on error
|
||||
*
|
||||
* \see exif_entry_new, exif_entry_unref
|
||||
*/
|
||||
ExifEntry *exif_entry_new_mem (ExifMem *);
|
||||
|
||||
/*! Increase reference counter for #ExifEntry.
|
||||
*
|
||||
* \param[in] entry #ExifEntry
|
||||
*
|
||||
* \see exif_entry_unref
|
||||
*/
|
||||
void exif_entry_ref (ExifEntry *entry);
|
||||
|
||||
/*! Decrease reference counter for #ExifEntry.
|
||||
* When the reference count drops to zero, free the entry.
|
||||
*
|
||||
* \param[in] entry #ExifEntry
|
||||
*/
|
||||
void exif_entry_unref (ExifEntry *entry);
|
||||
|
||||
/*! Actually free the #ExifEntry.
|
||||
*
|
||||
* \deprecated Should not be called directly. Use #exif_entry_ref and
|
||||
* #exif_entry_unref instead.
|
||||
*
|
||||
* \param[in] entry EXIF entry
|
||||
*/
|
||||
void exif_entry_free (ExifEntry *entry);
|
||||
|
||||
/*! Initialize an empty #ExifEntry with default data in the correct format
|
||||
* for the given tag. If the entry is already initialized, this function
|
||||
* does nothing.
|
||||
* This call allocates memory for the \c data element of the given #ExifEntry.
|
||||
* That memory is freed at the same time as the #ExifEntry.
|
||||
*
|
||||
* \param[out] e entry to initialize
|
||||
* \param[in] tag tag number to initialize as
|
||||
*/
|
||||
void exif_entry_initialize (ExifEntry *e, ExifTag tag);
|
||||
|
||||
/*! Fix the type or format of the given EXIF entry to bring it into spec.
|
||||
* If the data for this EXIF tag is in of the wrong type or is in an invalid
|
||||
* format according to the EXIF specification, then it is converted to make it
|
||||
* valid. This may involve, for example, converting an EXIF_FORMAT_LONG into a
|
||||
* EXIF_FORMAT_SHORT. If the tag is unknown, its value is untouched.
|
||||
*
|
||||
* \note Unfortunately, some conversions are to a type with a more restricted
|
||||
* range, which could have the side effect that the converted data becomes
|
||||
* invalid. This is unlikely as the range of each tag in the standard is
|
||||
* designed to encompass all likely data.
|
||||
*
|
||||
* \param[in,out] entry EXIF entry
|
||||
*/
|
||||
void exif_entry_fix (ExifEntry *entry);
|
||||
|
||||
|
||||
/* For your convenience */
|
||||
|
||||
/*! Return a localized textual representation of the value of the EXIF entry.
|
||||
* This is meant for display to the user. The format of each tag is subject
|
||||
* to change between locales and in newer versions of libexif. Users who
|
||||
* require the tag data in an unambiguous form should access the data members
|
||||
* of the #ExifEntry structure directly.
|
||||
*
|
||||
* \warning The character set of the returned string may be in
|
||||
* the encoding of the current locale or the native encoding
|
||||
* of the camera.
|
||||
* \bug The EXIF_TAG_XP_* tags are currently always returned in UTF-8,
|
||||
* regardless of locale, and code points above U+FFFF are not
|
||||
* supported.
|
||||
*
|
||||
* \param[in] entry EXIF entry
|
||||
* \param[out] val buffer in which to store value
|
||||
* \param[in] maxlen length of the buffer val
|
||||
* \return val pointer
|
||||
*/
|
||||
const char *exif_entry_get_value (ExifEntry *entry, char *val,
|
||||
unsigned int maxlen);
|
||||
|
||||
/*! Dump text representation of #ExifEntry to stdout.
|
||||
* This is intended for diagnostic purposes only.
|
||||
*
|
||||
* \param[in] entry EXIF tag data
|
||||
* \param[in] indent how many levels deep to indent the data
|
||||
*/
|
||||
void exif_entry_dump (ExifEntry *entry, unsigned int indent);
|
||||
|
||||
/*! Return the IFD number of the given #ExifEntry
|
||||
*
|
||||
* \param[in] e an #ExifEntry*
|
||||
* \return #ExifIfd, or #EXIF_IFD_COUNT on error
|
||||
*/
|
||||
#define exif_entry_get_ifd(e) ((e)?exif_content_get_ifd((e)->parent):EXIF_IFD_COUNT)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __EXIF_ENTRY_H__ */
|
||||
65
node_modules/sharp/vendor/include/libexif/exif-format.h
generated
vendored
Normal file
65
node_modules/sharp/vendor/include/libexif/exif-format.h
generated
vendored
Normal file
@ -0,0 +1,65 @@
|
||||
/*! \file exif-format.h
|
||||
* \brief Handling native EXIF data types
|
||||
*/
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2001 Lutz Mueller <lutz@users.sourceforge.net>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#ifndef __EXIF_FORMAT_H__
|
||||
#define __EXIF_FORMAT_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/*! EXIF tag data formats */
|
||||
typedef enum {
|
||||
EXIF_FORMAT_BYTE = 1,
|
||||
EXIF_FORMAT_ASCII = 2,
|
||||
EXIF_FORMAT_SHORT = 3,
|
||||
EXIF_FORMAT_LONG = 4,
|
||||
EXIF_FORMAT_RATIONAL = 5,
|
||||
EXIF_FORMAT_SBYTE = 6,
|
||||
EXIF_FORMAT_UNDEFINED = 7,
|
||||
EXIF_FORMAT_SSHORT = 8,
|
||||
EXIF_FORMAT_SLONG = 9,
|
||||
EXIF_FORMAT_SRATIONAL = 10,
|
||||
EXIF_FORMAT_FLOAT = 11,
|
||||
EXIF_FORMAT_DOUBLE = 12
|
||||
} ExifFormat;
|
||||
|
||||
/*! Return a textual representation of the given EXIF data type.
|
||||
*
|
||||
* \param[in] format EXIF data format
|
||||
* \return localized textual name
|
||||
*/
|
||||
const char *exif_format_get_name (ExifFormat format);
|
||||
|
||||
/*! Return the raw size of the given EXIF data type.
|
||||
*
|
||||
* \param[in] format EXIF data format
|
||||
* \return size in bytes
|
||||
*/
|
||||
unsigned char exif_format_get_size (ExifFormat format);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __EXIF_FORMAT_H__ */
|
||||
43
node_modules/sharp/vendor/include/libexif/exif-ifd.h
generated
vendored
Normal file
43
node_modules/sharp/vendor/include/libexif/exif-ifd.h
generated
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
/* exif-ifd.h
|
||||
*
|
||||
* Copyright (c) 2002 Lutz Mueller <lutz@users.sourceforge.net>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#ifndef __EXIF_IFD_H__
|
||||
#define __EXIF_IFD_H__
|
||||
|
||||
/*! Possible EXIF Image File Directories */
|
||||
typedef enum {
|
||||
EXIF_IFD_0 = 0, /*!< */
|
||||
EXIF_IFD_1, /*!< */
|
||||
EXIF_IFD_EXIF, /*!< */
|
||||
EXIF_IFD_GPS, /*!< */
|
||||
EXIF_IFD_INTEROPERABILITY, /*!< */
|
||||
EXIF_IFD_COUNT /*!< Not a real value, just (max_value + 1). */
|
||||
} ExifIfd;
|
||||
|
||||
/*! Return a textual name of the given IFD. The name is a short, unique,
|
||||
* non-localized text string containing only US-ASCII alphanumeric
|
||||
* characters.
|
||||
*
|
||||
* \param[in] ifd IFD
|
||||
* \return textual name of the IFD
|
||||
*/
|
||||
const char *exif_ifd_get_name (ExifIfd ifd);
|
||||
|
||||
#endif /* __EXIF_IFD_H__ */
|
||||
128
node_modules/sharp/vendor/include/libexif/exif-loader.h
generated
vendored
Normal file
128
node_modules/sharp/vendor/include/libexif/exif-loader.h
generated
vendored
Normal file
@ -0,0 +1,128 @@
|
||||
/*! \file exif-loader.h
|
||||
* \brief Defines the ExifLoader type
|
||||
*/
|
||||
/*
|
||||
* Copyright (c) 2003 Lutz Mueller <lutz@users.sourceforge.net>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#ifndef __EXIF_LOADER_H__
|
||||
#define __EXIF_LOADER_H__
|
||||
|
||||
#include <libexif/exif-data.h>
|
||||
#include <libexif/exif-log.h>
|
||||
#include <libexif/exif-mem.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/*! Data used by the loader interface */
|
||||
typedef struct _ExifLoader ExifLoader;
|
||||
|
||||
/*! Allocate a new #ExifLoader.
|
||||
*
|
||||
* \return allocated ExifLoader
|
||||
*/
|
||||
ExifLoader *exif_loader_new (void);
|
||||
|
||||
/*! Allocate a new #ExifLoader using the specified memory allocator.
|
||||
*
|
||||
* \param[in] mem the ExifMem
|
||||
* \return allocated ExifLoader
|
||||
*/
|
||||
ExifLoader *exif_loader_new_mem (ExifMem *mem);
|
||||
|
||||
/*! Increase the refcount of the #ExifLoader.
|
||||
*
|
||||
* \param[in] loader the ExifLoader to increase the refcount of.
|
||||
*/
|
||||
void exif_loader_ref (ExifLoader *loader);
|
||||
|
||||
/*! Decrease the refcount of the #ExifLoader.
|
||||
* If the refcount reaches 0, the loader is freed.
|
||||
*
|
||||
* \param[in] loader ExifLoader for which to decrease the refcount
|
||||
*/
|
||||
void exif_loader_unref (ExifLoader *loader);
|
||||
|
||||
/*! Load a file into the given #ExifLoader from the filesystem.
|
||||
* The relevant data is copied in raw form into the #ExifLoader.
|
||||
*
|
||||
* \param[in] loader loader to write to
|
||||
* \param[in] fname path to the file to read
|
||||
*/
|
||||
void exif_loader_write_file (ExifLoader *loader, const char *fname);
|
||||
|
||||
/*! Load a buffer into the #ExifLoader from a memory buffer.
|
||||
* The relevant data is copied in raw form into the #ExifLoader.
|
||||
*
|
||||
* \param[in] loader loader to write to
|
||||
* \param[in] buf buffer to read from
|
||||
* \param[in] sz size of the buffer
|
||||
* \return 1 while EXIF data is read (or while there is still hope that
|
||||
* there will be EXIF data later on), 0 otherwise.
|
||||
*/
|
||||
unsigned char exif_loader_write (ExifLoader *loader, unsigned char *buf, unsigned int sz);
|
||||
|
||||
/*! Free any data previously loaded and reset the #ExifLoader to its
|
||||
* newly-initialized state.
|
||||
*
|
||||
* \param[in] loader the loader
|
||||
*/
|
||||
void exif_loader_reset (ExifLoader *loader);
|
||||
|
||||
/*! Create an #ExifData from the data in the loader. The loader must
|
||||
* already contain data from a previous call to #exif_loader_write_file
|
||||
* or #exif_loader_write.
|
||||
*
|
||||
* \note The #ExifData returned is created using its default options, which
|
||||
* may take effect before the data is returned. If other options are desired,
|
||||
* an #ExifData must be created explicitly and data extracted from the loader
|
||||
* using #exif_loader_get_buf instead.
|
||||
*
|
||||
* \param[in] loader the loader
|
||||
* \return allocated ExifData
|
||||
*
|
||||
* \see exif_loader_get_buf
|
||||
*/
|
||||
ExifData *exif_loader_get_data (ExifLoader *loader);
|
||||
|
||||
/*! Return the raw data read by the loader. The returned pointer is only
|
||||
* guaranteed to be valid until the next call to a function modifying
|
||||
* this #ExifLoader. Either or both of buf and buf_size may be NULL on
|
||||
* entry, in which case that value is not returned.
|
||||
*
|
||||
* \param[in] loader the loader
|
||||
* \param[out] buf read-only pointer to the data read by the loader, or NULL
|
||||
* in case of error
|
||||
* \param[out] buf_size size of the data at buf, or 0 in case of error
|
||||
*/
|
||||
void exif_loader_get_buf (ExifLoader *loader, const unsigned char **buf,
|
||||
unsigned int *buf_size);
|
||||
|
||||
/*! Set the log message object used by this #ExifLoader.
|
||||
* \param[in] loader the loader
|
||||
* \param[in] log #ExifLog
|
||||
*/
|
||||
void exif_loader_log (ExifLoader *loader, ExifLog *log);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __EXIF_LOADER_H__ */
|
||||
116
node_modules/sharp/vendor/include/libexif/exif-log.h
generated
vendored
Normal file
116
node_modules/sharp/vendor/include/libexif/exif-log.h
generated
vendored
Normal file
@ -0,0 +1,116 @@
|
||||
/*! \file exif-log.h
|
||||
* \brief Log message infrastructure
|
||||
*/
|
||||
/*
|
||||
* Copyright (c) 2004 Lutz Mueller <lutz@users.sourceforge.net>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#ifndef __EXIF_LOG_H__
|
||||
#define __EXIF_LOG_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include <libexif/exif-mem.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
/*! State maintained by the logging interface */
|
||||
typedef struct _ExifLog ExifLog;
|
||||
|
||||
/*! Create a new logging instance.
|
||||
* \see exif_log_free
|
||||
*
|
||||
* \return new instance of #ExifLog
|
||||
*/
|
||||
ExifLog *exif_log_new (void);
|
||||
ExifLog *exif_log_new_mem (ExifMem *);
|
||||
void exif_log_ref (ExifLog *log);
|
||||
void exif_log_unref (ExifLog *log);
|
||||
|
||||
/*! Delete instance of #ExifLog.
|
||||
* \see exif_log_new
|
||||
*
|
||||
* \param[in] log #ExifLog
|
||||
* \return new instance of #ExifLog
|
||||
*/
|
||||
void exif_log_free (ExifLog *log);
|
||||
|
||||
typedef enum {
|
||||
EXIF_LOG_CODE_NONE,
|
||||
EXIF_LOG_CODE_DEBUG,
|
||||
EXIF_LOG_CODE_NO_MEMORY,
|
||||
EXIF_LOG_CODE_CORRUPT_DATA
|
||||
} ExifLogCode;
|
||||
|
||||
/*! Return a textual description of the given class of error log.
|
||||
*
|
||||
* \param[in] code logging message class
|
||||
* \return textual description of the log class
|
||||
*/
|
||||
const char *exif_log_code_get_title (ExifLogCode code);
|
||||
|
||||
/*! Return a verbose description of the given class of error log.
|
||||
*
|
||||
* \param[in] code logging message class
|
||||
* \return verbose description of the log class
|
||||
*/
|
||||
const char *exif_log_code_get_message (ExifLogCode code);
|
||||
|
||||
/*! Log callback function prototype.
|
||||
*/
|
||||
typedef void (* ExifLogFunc) (ExifLog *log, ExifLogCode, const char *domain,
|
||||
const char *format, va_list args, void *data);
|
||||
|
||||
/*! Register log callback function.
|
||||
* Calls to the log callback function are purely for diagnostic purposes.
|
||||
*
|
||||
* \param[in] log logging state variable
|
||||
* \param[in] func callback function to set
|
||||
* \param[in] data data to pass into callback function
|
||||
*/
|
||||
void exif_log_set_func (ExifLog *log, ExifLogFunc func, void *data);
|
||||
|
||||
#ifndef NO_VERBOSE_TAG_STRINGS
|
||||
void exif_log (ExifLog *log, ExifLogCode, const char *domain,
|
||||
const char *format, ...)
|
||||
#ifdef __GNUC__
|
||||
__attribute__((__format__(printf,4,5)))
|
||||
#endif
|
||||
;
|
||||
#else
|
||||
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
||||
#define exif_log(...) do { } while (0)
|
||||
#elif defined(__GNUC__)
|
||||
#define exif_log(x...) do { } while (0)
|
||||
#else
|
||||
#define exif_log (void)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
void exif_logv (ExifLog *log, ExifLogCode, const char *domain,
|
||||
const char *format, va_list args);
|
||||
|
||||
/* For your convenience */
|
||||
#define EXIF_LOG_NO_MEMORY(l,d,s) exif_log ((l), EXIF_LOG_CODE_NO_MEMORY, (d), "Could not allocate %lu byte(s).", (unsigned long)(s))
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __EXIF_LOG_H__ */
|
||||
90
node_modules/sharp/vendor/include/libexif/exif-mem.h
generated
vendored
Normal file
90
node_modules/sharp/vendor/include/libexif/exif-mem.h
generated
vendored
Normal file
@ -0,0 +1,90 @@
|
||||
/*! \file exif-mem.h
|
||||
* \brief Define the ExifMem data type and the associated functions.
|
||||
* ExifMem defines the memory management functions used within libexif.
|
||||
*/
|
||||
/* exif-mem.h
|
||||
*
|
||||
* Copyright (c) 2003 Lutz Mueller <lutz@users.sourceforge.net>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#ifndef __EXIF_MEM_H__
|
||||
#define __EXIF_MEM_H__
|
||||
|
||||
#include <libexif/exif-utils.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/*! Should work like calloc()
|
||||
*
|
||||
* \param[in] s the size of the block to allocate.
|
||||
* \return the allocated memory and initialized.
|
||||
*/
|
||||
typedef void * (* ExifMemAllocFunc) (ExifLong s);
|
||||
|
||||
/*! Should work like realloc()
|
||||
*
|
||||
* \param[in] p the pointer to reallocate
|
||||
* \param[in] s the size of the reallocated block
|
||||
* \return allocated memory
|
||||
*/
|
||||
typedef void * (* ExifMemReallocFunc) (void *p, ExifLong s);
|
||||
|
||||
/*! Free method for ExifMem
|
||||
*
|
||||
* \param[in] p the pointer to free
|
||||
* \return the freed pointer
|
||||
*/
|
||||
typedef void (* ExifMemFreeFunc) (void *p);
|
||||
|
||||
/*! ExifMem define a memory allocator */
|
||||
typedef struct _ExifMem ExifMem;
|
||||
|
||||
/*! Create a new ExifMem
|
||||
*
|
||||
* \param[in] a the allocator function
|
||||
* \param[in] r the reallocator function
|
||||
* \param[in] f the free function
|
||||
*/
|
||||
ExifMem *exif_mem_new (ExifMemAllocFunc a, ExifMemReallocFunc r,
|
||||
ExifMemFreeFunc f);
|
||||
/*! Refcount an ExifMem
|
||||
*/
|
||||
void exif_mem_ref (ExifMem *);
|
||||
|
||||
/*! Unrefcount an ExifMem.
|
||||
* If the refcount reaches 0, the ExifMem is freed
|
||||
*/
|
||||
void exif_mem_unref (ExifMem *);
|
||||
|
||||
void *exif_mem_alloc (ExifMem *m, ExifLong s);
|
||||
void *exif_mem_realloc (ExifMem *m, void *p, ExifLong s);
|
||||
void exif_mem_free (ExifMem *m, void *p);
|
||||
|
||||
/*! Create a new ExifMem with default values for your convenience
|
||||
*
|
||||
* \return return a new default ExifMem
|
||||
*/
|
||||
ExifMem *exif_mem_new_default (void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __EXIF_MEM_H__ */
|
||||
122
node_modules/sharp/vendor/include/libexif/exif-mnote-data.h
generated
vendored
Normal file
122
node_modules/sharp/vendor/include/libexif/exif-mnote-data.h
generated
vendored
Normal file
@ -0,0 +1,122 @@
|
||||
/*! \file exif-mnote-data.h
|
||||
* \brief Handling EXIF MakerNote tags
|
||||
*/
|
||||
/*
|
||||
* Copyright (c) 2003 Lutz Mueller <lutz@users.sourceforge.net>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#ifndef __EXIF_MNOTE_DATA_H__
|
||||
#define __EXIF_MNOTE_DATA_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include <libexif/exif-log.h>
|
||||
|
||||
/*! Data found in the MakerNote tag */
|
||||
typedef struct _ExifMnoteData ExifMnoteData;
|
||||
|
||||
void exif_mnote_data_ref (ExifMnoteData *);
|
||||
void exif_mnote_data_unref (ExifMnoteData *);
|
||||
|
||||
/*! Load the MakerNote data from a memory buffer.
|
||||
*
|
||||
* \param[in] d MakerNote data
|
||||
* \param[in] buf pointer to raw MakerNote tag data
|
||||
* \param[in] buf_siz number of bytes of data at buf
|
||||
*/
|
||||
void exif_mnote_data_load (ExifMnoteData *d, const unsigned char *buf,
|
||||
unsigned int buf_siz);
|
||||
|
||||
/*!
|
||||
* Save the raw MakerNote data into a memory buffer. The buffer is
|
||||
* allocated by this function and must subsequently be freed by the
|
||||
* caller.
|
||||
*
|
||||
* \param[in,out] d extract the data from this structure
|
||||
* \param[out] buf pointer to buffer pointer containing MakerNote data on return
|
||||
* \param[out] buf_siz pointer to the size of the buffer
|
||||
*/
|
||||
void exif_mnote_data_save (ExifMnoteData *d, unsigned char **buf,
|
||||
unsigned int *buf_siz);
|
||||
|
||||
/*! Return the number of tags in the MakerNote.
|
||||
*
|
||||
* \param[in] d MakerNote data
|
||||
* \return number of tags, or 0 if no MakerNote or the type is not supported
|
||||
*/
|
||||
unsigned int exif_mnote_data_count (ExifMnoteData *d);
|
||||
|
||||
/*! Return the MakerNote tag number for the tag at the specified index within
|
||||
* the MakerNote.
|
||||
*
|
||||
* \param[in] d MakerNote data
|
||||
* \param[in] n index of the entry within the MakerNote data
|
||||
* \return MakerNote tag number
|
||||
*/
|
||||
unsigned int exif_mnote_data_get_id (ExifMnoteData *d, unsigned int n);
|
||||
|
||||
/*! Returns textual name of the given MakerNote tag. The name is a short,
|
||||
* unique (within this type of MakerNote), non-localized text string
|
||||
* containing only US-ASCII alphanumeric characters.
|
||||
*
|
||||
* \param[in] d MakerNote data
|
||||
* \param[in] n index of the entry within the MakerNote data
|
||||
* \return textual name of the tag
|
||||
*/
|
||||
const char *exif_mnote_data_get_name (ExifMnoteData *d, unsigned int n);
|
||||
|
||||
/*! Returns textual title of the given MakerNote tag.
|
||||
* The title is a short, localized textual description of the tag.
|
||||
*
|
||||
* \param[in] d MakerNote data
|
||||
* \param[in] n index of the entry within the MakerNote data
|
||||
* \return textual name of the tag
|
||||
*/
|
||||
const char *exif_mnote_data_get_title (ExifMnoteData *d, unsigned int n);
|
||||
|
||||
/*! Returns verbose textual description of the given MakerNote tag.
|
||||
*
|
||||
* \param[in] d MakerNote data
|
||||
* \param[in] n index of the entry within the MakerNote data
|
||||
* \return textual description of the tag
|
||||
*/
|
||||
const char *exif_mnote_data_get_description (ExifMnoteData *d, unsigned int n);
|
||||
|
||||
/*! Return a textual representation of the value of the MakerNote entry.
|
||||
*
|
||||
* \warning The character set of the returned string may be in
|
||||
* the encoding of the current locale or the native encoding
|
||||
* of the camera.
|
||||
*
|
||||
* \param[in] d MakerNote data
|
||||
* \param[in] n index of the entry within the MakerNote data
|
||||
* \param[out] val buffer in which to store value
|
||||
* \param[in] maxlen length of the buffer val
|
||||
* \return val pointer, or NULL on error
|
||||
*/
|
||||
char *exif_mnote_data_get_value (ExifMnoteData *d, unsigned int n, char *val, unsigned int maxlen);
|
||||
|
||||
void exif_mnote_data_log (ExifMnoteData *, ExifLog *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __EXIF_MNOTE_DATA_H__ */
|
||||
287
node_modules/sharp/vendor/include/libexif/exif-tag.h
generated
vendored
Normal file
287
node_modules/sharp/vendor/include/libexif/exif-tag.h
generated
vendored
Normal file
@ -0,0 +1,287 @@
|
||||
/*! \file exif-tag.h
|
||||
* \brief Handling EXIF tags
|
||||
*/
|
||||
/*
|
||||
* Copyright (c) 2001 Lutz Mueller <lutz@users.sourceforge.net>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#ifndef __EXIF_TAG_H__
|
||||
#define __EXIF_TAG_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include <libexif/exif-ifd.h>
|
||||
#include <libexif/exif-data-type.h>
|
||||
|
||||
/*! EXIF tags */
|
||||
typedef enum {
|
||||
EXIF_TAG_INTEROPERABILITY_INDEX = 0x0001,
|
||||
EXIF_TAG_INTEROPERABILITY_VERSION = 0x0002,
|
||||
EXIF_TAG_NEW_SUBFILE_TYPE = 0x00fe,
|
||||
EXIF_TAG_IMAGE_WIDTH = 0x0100,
|
||||
EXIF_TAG_IMAGE_LENGTH = 0x0101,
|
||||
EXIF_TAG_BITS_PER_SAMPLE = 0x0102,
|
||||
EXIF_TAG_COMPRESSION = 0x0103,
|
||||
EXIF_TAG_PHOTOMETRIC_INTERPRETATION = 0x0106,
|
||||
EXIF_TAG_FILL_ORDER = 0x010a,
|
||||
EXIF_TAG_DOCUMENT_NAME = 0x010d,
|
||||
EXIF_TAG_IMAGE_DESCRIPTION = 0x010e,
|
||||
EXIF_TAG_MAKE = 0x010f,
|
||||
EXIF_TAG_MODEL = 0x0110,
|
||||
EXIF_TAG_STRIP_OFFSETS = 0x0111,
|
||||
EXIF_TAG_ORIENTATION = 0x0112,
|
||||
EXIF_TAG_SAMPLES_PER_PIXEL = 0x0115,
|
||||
EXIF_TAG_ROWS_PER_STRIP = 0x0116,
|
||||
EXIF_TAG_STRIP_BYTE_COUNTS = 0x0117,
|
||||
EXIF_TAG_X_RESOLUTION = 0x011a,
|
||||
EXIF_TAG_Y_RESOLUTION = 0x011b,
|
||||
EXIF_TAG_PLANAR_CONFIGURATION = 0x011c,
|
||||
EXIF_TAG_RESOLUTION_UNIT = 0x0128,
|
||||
EXIF_TAG_TRANSFER_FUNCTION = 0x012d,
|
||||
EXIF_TAG_SOFTWARE = 0x0131,
|
||||
EXIF_TAG_DATE_TIME = 0x0132,
|
||||
EXIF_TAG_ARTIST = 0x013b,
|
||||
EXIF_TAG_WHITE_POINT = 0x013e,
|
||||
EXIF_TAG_PRIMARY_CHROMATICITIES = 0x013f,
|
||||
EXIF_TAG_SUB_IFDS = 0x014a,
|
||||
EXIF_TAG_TRANSFER_RANGE = 0x0156,
|
||||
EXIF_TAG_JPEG_PROC = 0x0200,
|
||||
EXIF_TAG_JPEG_INTERCHANGE_FORMAT = 0x0201,
|
||||
EXIF_TAG_JPEG_INTERCHANGE_FORMAT_LENGTH = 0x0202,
|
||||
EXIF_TAG_YCBCR_COEFFICIENTS = 0x0211,
|
||||
EXIF_TAG_YCBCR_SUB_SAMPLING = 0x0212,
|
||||
EXIF_TAG_YCBCR_POSITIONING = 0x0213,
|
||||
EXIF_TAG_REFERENCE_BLACK_WHITE = 0x0214,
|
||||
EXIF_TAG_XML_PACKET = 0x02bc,
|
||||
EXIF_TAG_RELATED_IMAGE_FILE_FORMAT = 0x1000,
|
||||
EXIF_TAG_RELATED_IMAGE_WIDTH = 0x1001,
|
||||
EXIF_TAG_RELATED_IMAGE_LENGTH = 0x1002,
|
||||
EXIF_TAG_CFA_REPEAT_PATTERN_DIM = 0x828d,
|
||||
EXIF_TAG_CFA_PATTERN = 0x828e,
|
||||
EXIF_TAG_BATTERY_LEVEL = 0x828f,
|
||||
EXIF_TAG_COPYRIGHT = 0x8298,
|
||||
EXIF_TAG_EXPOSURE_TIME = 0x829a,
|
||||
EXIF_TAG_FNUMBER = 0x829d,
|
||||
EXIF_TAG_IPTC_NAA = 0x83bb,
|
||||
EXIF_TAG_IMAGE_RESOURCES = 0x8649,
|
||||
EXIF_TAG_EXIF_IFD_POINTER = 0x8769,
|
||||
EXIF_TAG_INTER_COLOR_PROFILE = 0x8773,
|
||||
EXIF_TAG_EXPOSURE_PROGRAM = 0x8822,
|
||||
EXIF_TAG_SPECTRAL_SENSITIVITY = 0x8824,
|
||||
EXIF_TAG_GPS_INFO_IFD_POINTER = 0x8825,
|
||||
EXIF_TAG_ISO_SPEED_RATINGS = 0x8827,
|
||||
EXIF_TAG_OECF = 0x8828,
|
||||
EXIF_TAG_TIME_ZONE_OFFSET = 0x882a,
|
||||
EXIF_TAG_EXIF_VERSION = 0x9000,
|
||||
EXIF_TAG_DATE_TIME_ORIGINAL = 0x9003,
|
||||
EXIF_TAG_DATE_TIME_DIGITIZED = 0x9004,
|
||||
EXIF_TAG_COMPONENTS_CONFIGURATION = 0x9101,
|
||||
EXIF_TAG_COMPRESSED_BITS_PER_PIXEL = 0x9102,
|
||||
EXIF_TAG_SHUTTER_SPEED_VALUE = 0x9201,
|
||||
EXIF_TAG_APERTURE_VALUE = 0x9202,
|
||||
EXIF_TAG_BRIGHTNESS_VALUE = 0x9203,
|
||||
EXIF_TAG_EXPOSURE_BIAS_VALUE = 0x9204,
|
||||
EXIF_TAG_MAX_APERTURE_VALUE = 0x9205,
|
||||
EXIF_TAG_SUBJECT_DISTANCE = 0x9206,
|
||||
EXIF_TAG_METERING_MODE = 0x9207,
|
||||
EXIF_TAG_LIGHT_SOURCE = 0x9208,
|
||||
EXIF_TAG_FLASH = 0x9209,
|
||||
EXIF_TAG_FOCAL_LENGTH = 0x920a,
|
||||
EXIF_TAG_SUBJECT_AREA = 0x9214,
|
||||
EXIF_TAG_TIFF_EP_STANDARD_ID = 0x9216,
|
||||
EXIF_TAG_MAKER_NOTE = 0x927c,
|
||||
EXIF_TAG_USER_COMMENT = 0x9286,
|
||||
EXIF_TAG_SUB_SEC_TIME = 0x9290,
|
||||
EXIF_TAG_SUB_SEC_TIME_ORIGINAL = 0x9291,
|
||||
EXIF_TAG_SUB_SEC_TIME_DIGITIZED = 0x9292,
|
||||
EXIF_TAG_XP_TITLE = 0x9c9b,
|
||||
EXIF_TAG_XP_COMMENT = 0x9c9c,
|
||||
EXIF_TAG_XP_AUTHOR = 0x9c9d,
|
||||
EXIF_TAG_XP_KEYWORDS = 0x9c9e,
|
||||
EXIF_TAG_XP_SUBJECT = 0x9c9f,
|
||||
EXIF_TAG_FLASH_PIX_VERSION = 0xa000,
|
||||
EXIF_TAG_COLOR_SPACE = 0xa001,
|
||||
EXIF_TAG_PIXEL_X_DIMENSION = 0xa002,
|
||||
EXIF_TAG_PIXEL_Y_DIMENSION = 0xa003,
|
||||
EXIF_TAG_RELATED_SOUND_FILE = 0xa004,
|
||||
EXIF_TAG_INTEROPERABILITY_IFD_POINTER = 0xa005,
|
||||
EXIF_TAG_FLASH_ENERGY = 0xa20b,
|
||||
EXIF_TAG_SPATIAL_FREQUENCY_RESPONSE = 0xa20c,
|
||||
EXIF_TAG_FOCAL_PLANE_X_RESOLUTION = 0xa20e,
|
||||
EXIF_TAG_FOCAL_PLANE_Y_RESOLUTION = 0xa20f,
|
||||
EXIF_TAG_FOCAL_PLANE_RESOLUTION_UNIT = 0xa210,
|
||||
EXIF_TAG_SUBJECT_LOCATION = 0xa214,
|
||||
EXIF_TAG_EXPOSURE_INDEX = 0xa215,
|
||||
EXIF_TAG_SENSING_METHOD = 0xa217,
|
||||
EXIF_TAG_FILE_SOURCE = 0xa300,
|
||||
EXIF_TAG_SCENE_TYPE = 0xa301,
|
||||
EXIF_TAG_NEW_CFA_PATTERN = 0xa302,
|
||||
EXIF_TAG_CUSTOM_RENDERED = 0xa401,
|
||||
EXIF_TAG_EXPOSURE_MODE = 0xa402,
|
||||
EXIF_TAG_WHITE_BALANCE = 0xa403,
|
||||
EXIF_TAG_DIGITAL_ZOOM_RATIO = 0xa404,
|
||||
EXIF_TAG_FOCAL_LENGTH_IN_35MM_FILM = 0xa405,
|
||||
EXIF_TAG_SCENE_CAPTURE_TYPE = 0xa406,
|
||||
EXIF_TAG_GAIN_CONTROL = 0xa407,
|
||||
EXIF_TAG_CONTRAST = 0xa408,
|
||||
EXIF_TAG_SATURATION = 0xa409,
|
||||
EXIF_TAG_SHARPNESS = 0xa40a,
|
||||
EXIF_TAG_DEVICE_SETTING_DESCRIPTION = 0xa40b,
|
||||
EXIF_TAG_SUBJECT_DISTANCE_RANGE = 0xa40c,
|
||||
EXIF_TAG_IMAGE_UNIQUE_ID = 0xa420,
|
||||
EXIF_TAG_GAMMA = 0xa500,
|
||||
EXIF_TAG_PRINT_IMAGE_MATCHING = 0xc4a5,
|
||||
EXIF_TAG_PADDING = 0xea1c
|
||||
} ExifTag;
|
||||
|
||||
/* GPS tags overlap with above ones. */
|
||||
#define EXIF_TAG_GPS_VERSION_ID 0x0000
|
||||
#define EXIF_TAG_GPS_LATITUDE_REF 0x0001 /* INTEROPERABILITY_INDEX */
|
||||
#define EXIF_TAG_GPS_LATITUDE 0x0002 /* INTEROPERABILITY_VERSION */
|
||||
#define EXIF_TAG_GPS_LONGITUDE_REF 0x0003
|
||||
#define EXIF_TAG_GPS_LONGITUDE 0x0004
|
||||
#define EXIF_TAG_GPS_ALTITUDE_REF 0x0005
|
||||
#define EXIF_TAG_GPS_ALTITUDE 0x0006
|
||||
#define EXIF_TAG_GPS_TIME_STAMP 0x0007
|
||||
#define EXIF_TAG_GPS_SATELLITES 0x0008
|
||||
#define EXIF_TAG_GPS_STATUS 0x0009
|
||||
#define EXIF_TAG_GPS_MEASURE_MODE 0x000a
|
||||
#define EXIF_TAG_GPS_DOP 0x000b
|
||||
#define EXIF_TAG_GPS_SPEED_REF 0x000c
|
||||
#define EXIF_TAG_GPS_SPEED 0x000d
|
||||
#define EXIF_TAG_GPS_TRACK_REF 0x000e
|
||||
#define EXIF_TAG_GPS_TRACK 0x000f
|
||||
#define EXIF_TAG_GPS_IMG_DIRECTION_REF 0x0010
|
||||
#define EXIF_TAG_GPS_IMG_DIRECTION 0x0011
|
||||
#define EXIF_TAG_GPS_MAP_DATUM 0x0012
|
||||
#define EXIF_TAG_GPS_DEST_LATITUDE_REF 0x0013
|
||||
#define EXIF_TAG_GPS_DEST_LATITUDE 0x0014
|
||||
#define EXIF_TAG_GPS_DEST_LONGITUDE_REF 0x0015
|
||||
#define EXIF_TAG_GPS_DEST_LONGITUDE 0x0016
|
||||
#define EXIF_TAG_GPS_DEST_BEARING_REF 0x0017
|
||||
#define EXIF_TAG_GPS_DEST_BEARING 0x0018
|
||||
#define EXIF_TAG_GPS_DEST_DISTANCE_REF 0x0019
|
||||
#define EXIF_TAG_GPS_DEST_DISTANCE 0x001a
|
||||
#define EXIF_TAG_GPS_PROCESSING_METHOD 0x001b
|
||||
#define EXIF_TAG_GPS_AREA_INFORMATION 0x001c
|
||||
#define EXIF_TAG_GPS_DATE_STAMP 0x001d
|
||||
#define EXIF_TAG_GPS_DIFFERENTIAL 0x001e
|
||||
|
||||
/*! What level of support a tag enjoys in the EXIF standard */
|
||||
typedef enum {
|
||||
/*! The meaning of this tag is unknown */
|
||||
EXIF_SUPPORT_LEVEL_UNKNOWN = 0,
|
||||
|
||||
/*! This tag is not allowed in the given IFD */
|
||||
EXIF_SUPPORT_LEVEL_NOT_RECORDED,
|
||||
|
||||
/*! This tag is mandatory in the given IFD */
|
||||
EXIF_SUPPORT_LEVEL_MANDATORY,
|
||||
|
||||
/*! This tag is optional in the given IFD */
|
||||
EXIF_SUPPORT_LEVEL_OPTIONAL
|
||||
} ExifSupportLevel;
|
||||
|
||||
/*! Return the tag ID given its unique textual name.
|
||||
*
|
||||
* \param[in] name tag name
|
||||
* \return tag ID, or 0 if tag not found
|
||||
* \note The tag not found value cannot be distinguished from a legitimate
|
||||
* tag number 0.
|
||||
*/
|
||||
ExifTag exif_tag_from_name (const char *name);
|
||||
|
||||
/*! Return a textual name of the given tag when found in the given IFD. The
|
||||
* name is a short, unique, non-localized text string containing only
|
||||
* US-ASCII alphanumeric characters.
|
||||
*
|
||||
* \param[in] tag EXIF tag
|
||||
* \param[in] ifd IFD
|
||||
* \return textual name of the tag, or NULL if the tag is unknown
|
||||
*/
|
||||
const char *exif_tag_get_name_in_ifd (ExifTag tag, ExifIfd ifd);
|
||||
|
||||
/*! Return a textual title of the given tag when found in the given IFD.
|
||||
* The title is a short, localized description of the tag.
|
||||
*
|
||||
* \param[in] tag EXIF tag
|
||||
* \param[in] ifd IFD
|
||||
* \return textual title of the tag, or NULL if the tag is unknown
|
||||
*/
|
||||
const char *exif_tag_get_title_in_ifd (ExifTag tag, ExifIfd ifd);
|
||||
|
||||
/*! Return a verbose textual description of the given tag when found in the
|
||||
* given IFD. The description is a verbose, localized description of the tag.
|
||||
*
|
||||
* \param[in] tag EXIF tag
|
||||
* \param[in] ifd IFD
|
||||
* \return textual description of the tag, or NULL if the tag is unknown
|
||||
*/
|
||||
const char *exif_tag_get_description_in_ifd (ExifTag tag, ExifIfd ifd);
|
||||
|
||||
/*! 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_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_UNKNOWN
|
||||
* \return the level of support for this tag
|
||||
*/
|
||||
ExifSupportLevel exif_tag_get_support_level_in_ifd (ExifTag tag, ExifIfd ifd,
|
||||
ExifDataType t);
|
||||
|
||||
/* Don't use these functions. They are here for compatibility only. */
|
||||
|
||||
/*! \deprecated Use #exif_tag_get_name_in_ifd instead */
|
||||
const char *exif_tag_get_name (ExifTag tag);
|
||||
|
||||
/*! \deprecated Use #exif_tag_get_title_in_ifd instead */
|
||||
const char *exif_tag_get_title (ExifTag tag);
|
||||
|
||||
/*! \deprecated Use #exif_tag_get_description_in_ifd instead */
|
||||
const char *exif_tag_get_description (ExifTag tag);
|
||||
|
||||
|
||||
/* For now, do not use these functions. */
|
||||
|
||||
/*! \internal */
|
||||
ExifTag exif_tag_table_get_tag (unsigned int n);
|
||||
|
||||
/*! \internal */
|
||||
const char *exif_tag_table_get_name (unsigned int n);
|
||||
|
||||
/*! \internal */
|
||||
unsigned int exif_tag_table_count (void);
|
||||
|
||||
|
||||
/* Don't use these definitions. They are here for compatibility only. */
|
||||
|
||||
/*! \deprecated Use EXIF_TAG_PRINT_IMAGE_MATCHING instead. */
|
||||
#define EXIF_TAG_UNKNOWN_C4A5 EXIF_TAG_PRINT_IMAGE_MATCHING
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __EXIF_TAG_H__ */
|
||||
194
node_modules/sharp/vendor/include/libexif/exif-utils.h
generated
vendored
Normal file
194
node_modules/sharp/vendor/include/libexif/exif-utils.h
generated
vendored
Normal file
@ -0,0 +1,194 @@
|
||||
/*! \file exif-utils.h
|
||||
* \brief EXIF data manipulation functions and types
|
||||
*/
|
||||
/*
|
||||
* Copyright (c) 2001 Lutz Mueller <lutz@users.sourceforge.net>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#ifndef __EXIF_UTILS_H__
|
||||
#define __EXIF_UTILS_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include <libexif/exif-byte-order.h>
|
||||
#include <libexif/exif-format.h>
|
||||
#include <libexif/_stdint.h>
|
||||
|
||||
|
||||
/* If these definitions don't work for you, please let us fix the
|
||||
* macro generating _stdint.h */
|
||||
|
||||
/*! EXIF Unsigned Byte data type */
|
||||
typedef unsigned char ExifByte; /* 1 byte */
|
||||
|
||||
/*! EXIF Signed Byte data type */
|
||||
typedef signed char ExifSByte; /* 1 byte */
|
||||
|
||||
/*! EXIF Text String data type */
|
||||
typedef char * ExifAscii;
|
||||
|
||||
/*! EXIF Unsigned Short data type */
|
||||
typedef uint16_t ExifShort; /* 2 bytes */
|
||||
|
||||
/*! EXIF Signed Short data type */
|
||||
typedef int16_t ExifSShort; /* 2 bytes */
|
||||
|
||||
/*! EXIF Unsigned Long data type */
|
||||
typedef uint32_t ExifLong; /* 4 bytes */
|
||||
|
||||
/*! EXIF Signed Long data type */
|
||||
typedef int32_t ExifSLong; /* 4 bytes */
|
||||
|
||||
/*! EXIF Unsigned Rational data type */
|
||||
typedef struct {ExifLong numerator; ExifLong denominator;} ExifRational;
|
||||
|
||||
typedef char ExifUndefined; /* 1 byte */
|
||||
|
||||
/*! EXIF Signed Rational data type */
|
||||
typedef struct {ExifSLong numerator; ExifSLong denominator;} ExifSRational;
|
||||
|
||||
|
||||
/*! Retrieve an #ExifShort value from memory.
|
||||
*
|
||||
* \param[in] b pointer to raw EXIF value in memory
|
||||
* \param[in] order byte order of raw value
|
||||
* \return value
|
||||
*/
|
||||
ExifShort exif_get_short (const unsigned char *b, ExifByteOrder order);
|
||||
|
||||
/*! Retrieve an #ExifSShort value from memory.
|
||||
*
|
||||
* \param[in] b pointer to raw EXIF value in memory
|
||||
* \param[in] order byte order of raw value
|
||||
* \return value
|
||||
*/
|
||||
ExifSShort exif_get_sshort (const unsigned char *b, ExifByteOrder order);
|
||||
|
||||
/*! Retrieve an #ExifLong value from memory.
|
||||
*
|
||||
* \param[in] b pointer to raw EXIF value in memory
|
||||
* \param[in] order byte order of raw value
|
||||
* \return value
|
||||
*/
|
||||
ExifLong exif_get_long (const unsigned char *b, ExifByteOrder order);
|
||||
|
||||
/*! Retrieve an #ExifSLong value from memory.
|
||||
*
|
||||
* \param[in] b pointer to raw EXIF value in memory
|
||||
* \param[in] order byte order of raw value
|
||||
* \return value
|
||||
*/
|
||||
ExifSLong exif_get_slong (const unsigned char *b, ExifByteOrder order);
|
||||
|
||||
/*! Retrieve an #ExifRational value from memory.
|
||||
*
|
||||
* \param[in] b pointer to raw EXIF value in memory
|
||||
* \param[in] order byte order of raw value
|
||||
* \return value
|
||||
*/
|
||||
ExifRational exif_get_rational (const unsigned char *b, ExifByteOrder order);
|
||||
|
||||
/*! Retrieve an #ExifSRational value from memory.
|
||||
*
|
||||
* \param[in] b pointer to raw EXIF value in memory
|
||||
* \param[in] order byte order of raw value
|
||||
* \return value
|
||||
*/
|
||||
ExifSRational exif_get_srational (const unsigned char *b, ExifByteOrder order);
|
||||
|
||||
/*! Store an ExifShort value into memory in EXIF format.
|
||||
*
|
||||
* \param[out] b buffer in which to write raw value
|
||||
* \param[in] order byte order to use
|
||||
* \param[in] value data value to store
|
||||
*/
|
||||
void exif_set_short (unsigned char *b, ExifByteOrder order,
|
||||
ExifShort value);
|
||||
|
||||
/*! Store an ExifSShort value into memory in EXIF format.
|
||||
*
|
||||
* \param[out] b buffer in which to write raw value
|
||||
* \param[in] order byte order to use
|
||||
* \param[in] value data value to store
|
||||
*/
|
||||
void exif_set_sshort (unsigned char *b, ExifByteOrder order,
|
||||
ExifSShort value);
|
||||
|
||||
/*! Store an ExifLong value into memory in EXIF format.
|
||||
*
|
||||
* \param[out] b buffer in which to write raw value
|
||||
* \param[in] order byte order to use
|
||||
* \param[in] value data value to store
|
||||
*/
|
||||
void exif_set_long (unsigned char *b, ExifByteOrder order,
|
||||
ExifLong value);
|
||||
|
||||
/*! Store an ExifSLong value into memory in EXIF format.
|
||||
*
|
||||
* \param[out] b buffer in which to write raw value
|
||||
* \param[in] order byte order to use
|
||||
* \param[in] value data value to store
|
||||
*/
|
||||
void exif_set_slong (unsigned char *b, ExifByteOrder order,
|
||||
ExifSLong value);
|
||||
|
||||
/*! Store an ExifRational value into memory in EXIF format.
|
||||
*
|
||||
* \param[out] b buffer in which to write raw value
|
||||
* \param[in] order byte order to use
|
||||
* \param[in] value data value to store
|
||||
*/
|
||||
void exif_set_rational (unsigned char *b, ExifByteOrder order,
|
||||
ExifRational value);
|
||||
|
||||
/*! Store an ExifSRational value into memory in EXIF format.
|
||||
*
|
||||
* \param[out] b buffer in which to write raw value
|
||||
* \param[in] order byte order to use
|
||||
* \param[in] value data value to store
|
||||
*/
|
||||
void exif_set_srational (unsigned char *b, ExifByteOrder order,
|
||||
ExifSRational value);
|
||||
|
||||
/*! \internal */
|
||||
void exif_convert_utf16_to_utf8 (char *out, const unsigned short *in, int maxlen);
|
||||
|
||||
/* Please do not use this function outside of the library. */
|
||||
|
||||
/*! \internal */
|
||||
void exif_array_set_byte_order (ExifFormat, unsigned char *, unsigned int,
|
||||
ExifByteOrder o_orig, ExifByteOrder o_new);
|
||||
|
||||
#undef MIN
|
||||
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
|
||||
|
||||
#undef MAX
|
||||
#define MAX(a, b) (((a) > (b)) ? (a) : (b))
|
||||
|
||||
/* For compatibility with older versions */
|
||||
|
||||
/*! \deprecated Use EXIF_TAG_SUB_SEC_TIME instead. */
|
||||
#define EXIF_TAG_SUBSEC_TIME EXIF_TAG_SUB_SEC_TIME
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __EXIF_UTILS_H__ */
|
||||
Reference in New Issue
Block a user