MCPcopy Create free account
hub / github.com/AOMediaCodec/libavif / avifEncoderDataCreateXMPItem

Function avifEncoderDataCreateXMPItem

src/write.c:1135–1148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1133}
1134
1135static avifResult avifEncoderDataCreateXMPItem(avifEncoderData * data, const avifRWData * xmp)
1136{
1137 avifEncoderItem * xmpItem = avifEncoderDataCreateItem(data, "mime", "XMP", 4, 0);
1138 if (!xmpItem) {
1139 return AVIF_RESULT_OUT_OF_MEMORY;
1140 }
1141 xmpItem->irefToID = data->primaryItemID;
1142 xmpItem->irefType = "cdsc";
1143
1144 xmpItem->infeContentType = xmpContentType;
1145 xmpItem->infeContentTypeSize = xmpContentTypeSize;
1146 AVIF_CHECKRES(avifRWDataSet(&xmpItem->metadataPayload, xmp->data, xmp->size));
1147 return AVIF_RESULT_OK;
1148}
1149
1150// Same as avifImageCopy() but pads the dstImage with border pixel values to reach dstWidth and dstHeight.
1151static avifResult avifImageCopyAndPad(avifImage * const dstImage, const avifImage * srcImage, uint32_t dstWidth, uint32_t dstHeight)

Callers 1

Calls 2

avifRWDataSetFunction · 0.85

Tested by

no test coverage detected