Common APIs for chunks metadata and color profile.

Change-Id: Ie105ce913c0b56e34cc26fd7ec397103354f268a
This commit is contained in:
Urvang Joshi
2012-08-23 15:28:20 +05:30
committed by Gerrit Code Review
parent 2a3117a1e6
commit 1c04a0d438
7 changed files with 95 additions and 118 deletions

View File

@ -77,9 +77,9 @@ profile & XMP metadata.
// ... (Prepare image data).
WebPMuxSetImage(mux, &image, copy_data);
// ... (Prepare ICCP color profile data).
WebPMuxSetColorProfile(mux, &icc_profile, copy_data);
WebPMuxSetChunk(mux, "ICCP", &icc_profile, copy_data);
// ... (Prepare XMP metadata).
WebPMuxSetMetadata(mux, &xmp, copy_data);
WebPMuxSetChunk(mux, "META", &xmp, copy_data);
// Get data from mux in WebP RIFF format.
WebPMuxAssemble(mux, &output_data);
WebPMuxDelete(mux);
@ -94,7 +94,7 @@ Example#2 (pseudo code): Get image & color profile data from a WebP file.
WebPMux* mux = WebPMuxCreate(&data, copy_data);
WebPMuxGetImage(mux, &image);
// ... (Consume image; e.g. call WebPDecode() to decode the data).
WebPMuxGetColorProfile(mux, &icc_profile);
WebPMuxGetChunk(mux, "ICCP", &icc_profile);
// ... (Consume icc_profile).
WebPMuxDelete(mux);
free(data);