Loading...
Searching...
No Matches
exifite.h File Reference
Bounded C11 EXIF metadata and JPEG streaming interfaces. More...
#include <stdbool.h>#include <stddef.h>#include <stdint.h>#include <stdio.h>
Include dependency graph for exifite.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Data Structures | |
| struct | exif_value |
| Borrowed bytes plus enough type information for safe interpretation. More... | |
| struct | exif_view |
| Borrowed view of a validated APP1 payload. More... | |
| struct | exif_item |
| Writer bookkeeping for one field inside the document's value storage. More... | |
| struct | exif_document |
| Caller-owned bounded writer with no heap allocation. More... | |
Macros | |
| #define | EXIF_MAX_PAYLOAD 65533U |
| APP1 payload ceiling: the JPEG length includes its own two bytes. | |
| #define | EXIF_MAX_ENTRIES 48U |
| Writer entry budget, including the standard initialization tags. | |
Typedefs | |
| typedef bool(* | exif_tag_selector) (void *context, enum exif_directory directory, uint16_t tag) |
| Caller policy for additional, directory-local fields to import. | |
Functions | |
| int | exif_parse (struct exif_view *view, const unsigned char *payload, size_t size) |
| Validate an EXIF APP1 payload and create a borrowed view. | |
| bool | exif_get (const struct exif_view *view, enum exif_directory directory, uint16_t tag, struct exif_value *value) |
| Look up a directory-local tag without copying its bytes. | |
| bool | exif_value_unsigned (const struct exif_value *value, size_t index, uint32_t *result) |
| Decode one BYTE, SHORT or LONG component without an unaligned load. | |
| bool | exif_value_rational (const struct exif_value *value, size_t index, double *result) |
| Decode one unsigned or signed rational component as a double. | |
| size_t | exif_text_length (const struct exif_value *value) |
| Count text bytes after trimming trailing NUL padding only. | |
| void | exif_document_init (struct exif_document *document) |
| Start a fresh upright sRGB/Y-Cb-Cr document with EXIF 2.32 defaults. | |
| bool | exif_document_get (const struct exif_document *document, enum exif_directory directory, uint16_t tag, struct exif_value *value) |
| Borrow a field from the current writable document. | |
| int | exif_document_import (struct exif_document *document, const struct exif_view *view) |
| Rebuild a writable document from supported Sensoraia fields. | |
| int | exif_document_import_custom (struct exif_document *document, const struct exif_view *view, exif_tag_selector select, void *context) |
| Import standard fields plus additional tags selected by the caller. | |
| int | exif_document_remove (struct exif_document *document, enum exif_directory directory, uint16_t tag) |
| Remove a tag and reclaim its packed value storage. | |
| unsigned char * | exif_document_reserve (struct exif_document *document, enum exif_directory directory, uint16_t tag, enum exif_format format, uint32_t count) |
| Create or replace a field with zeroed, bounded value storage. | |
| int | exif_document_ascii (struct exif_document *document, enum exif_directory directory, uint16_t tag, const char *text) |
| Replace an ASCII field, including its terminating NUL byte. | |
| int | exif_document_rational (struct exif_document *document, enum exif_directory directory, uint16_t tag, uint32_t numerator, uint32_t denominator) |
| Store an unsigned measurement as an exact numerator/denominator pair. | |
| void | exif_encode_short (unsigned char *data, uint16_t value) |
| Encode a 16-bit value in the writer's little-endian representation. | |
| void | exif_encode_long (unsigned char *data, uint32_t value) |
| Encode a 32-bit value in the writer's little-endian representation. | |
| int | exif_serialize (const struct exif_document *document, unsigned char *payload, size_t capacity, size_t *size) |
| Serialize a document into one complete EXIF APP1 payload. | |
| int | exif_read_jpeg (const char *filename, unsigned char *payload, size_t capacity, size_t *size) |
| Read the single EXIF APP1 segment before the first JPEG scan. | |
| int | exif_read_stream (FILE *input, unsigned char *payload, size_t capacity, size_t *size) |
| Read capture EXIF from an already-open JPEG without reopening its path. | |
| int | exif_jpeg_dimensions (FILE *input, uint32_t *width, uint32_t *height, unsigned *components) |
| Inspect the frame header without allocating or decoding image pixels. | |
| int | exif_rewrite_jpeg (FILE *input, FILE *output, const unsigned char *payload, size_t size) |
| Stream a JPEG with one new EXIF segment instead of its old EXIF records. | |
| int | exif_update_jpeg (FILE *file, const unsigned char *payload, size_t size) |
| Replace EXIF in a regular JPEG file without a temporary file. | |
Detailed Description
Bounded C11 EXIF metadata and JPEG streaming interfaces.
EXIFite covers Sensoraia's metadata without a general-purpose TIFF object graph. Callers own the storage so memory use stays predictable on MORA. Readers borrow bytes; writers collect little-endian values before producing one JPEG APP1 payload. No function decodes or recompresses image pixels.
- See also
- exifite.c
Definition in file exifite.h.