Skip to content

Commit

Permalink
properties: add extra usage documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
bradh committed Nov 27, 2024
1 parent 1d193cf commit 2f4fe06
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion include/avif/avif.h
Original file line number Diff line number Diff line change
Expand Up @@ -862,8 +862,15 @@ AVIF_API avifResult avifImageAllocatePlanes(avifImage * image, avifPlanesFlags p
AVIF_API void avifImageFreePlanes(avifImage * image, avifPlanesFlags planes); // Ignores already-freed planes
AVIF_API void avifImageStealPlanes(avifImage * dstImage, avifImage * srcImage, avifPlanesFlags planes);

// Add arbitrary (opaque) properties to the image
// Add arbitrary (opaque) properties to the image.
// Use of these functions for known properties and boxes (e.g. ispe or meta) will likely result in
// invalid files, and should be avoided.
// If creating a ItemFullProperty, the version and flags values should be provided as the first four bytes of
// the data argument, and accounted for in the dataSize.
AVIF_API avifResult avifImageAddOpaqueProperty(avifImage * image, const uint8_t boxtype[4], const uint8_t * data, size_t dataSize);
// This version adds an ItemProperty (or ItemFullProperty if version and flags are provided in data argument), using
// the user extension (uuid) mechanism, see ISO/IEC 14496-12:2022 Section 4.2. The box type is set to 'uuid' and
// does not need to be specified.
AVIF_API avifResult avifImageAddUUIDProperty(avifImage * image, const uint8_t uuid[16], const uint8_t * data, size_t dataSize);

// ---------------------------------------------------------------------------
Expand Down

0 comments on commit 2f4fe06

Please sign in to comment.