tree: ed2bde7ea65ee9a10e3fb80486fe3400614475a7 [path history] [tgz]
  1. goldens/
  2. io/
  3. sources/
  4. alpha_noispe.avif
  5. ArcTriomphe-cHRM-orig.png
  6. ArcTriomphe-cHRM-red-green-swap-reference.png
  7. ArcTriomphe-cHRM-red-green-swap.png
  8. circle-trns-after-plte.png
  9. circle-trns-before-plte.png
  10. color_grid_alpha_grid_gainmap_nogrid.avif
  11. color_grid_alpha_nogrid.avif
  12. color_grid_gainmap_different_grid.avif
  13. color_nogrid_alpha_nogrid_gainmap_grid.avif
  14. colors-animated-8bpc-alpha-exif-xmp.avif
  15. colors-animated-8bpc.avif
  16. colors_hdr_p3.avif
  17. colors_hdr_rec2020.avif
  18. colors_hdr_srgb.avif
  19. colors_sdr_srgb.avif
  20. colors_text_hdr_p3.avif
  21. colors_text_hdr_rec2020.avif
  22. colors_text_hdr_srgb.avif
  23. colors_text_sdr_srgb.avif
  24. colors_text_wcg_hdr_rec2020.avif
  25. colors_text_wcg_sdr_rec2020.avif
  26. colors_wcg_hdr_rec2020.avif
  27. cosmos1650_yuv444_10bpc_p3pq.y4m
  28. dog_exif_extended_xmp_icc.jpg
  29. draw_points.png
  30. ffffcc-gamma1.6.png
  31. ffffcc-gamma2.2.png
  32. ffffcc-srgb.png
  33. ffffff-gamma1.6.png
  34. ffffff-gamma2.2.png
  35. kodim03_grayscale_gamma1.6-reference.png
  36. kodim03_grayscale_gamma1.6.png
  37. kodim03_yuv420_8bpc.y4m
  38. kodim23_yuv420_8bpc.y4m
  39. paris_exif_orientation_5.jpg
  40. paris_exif_xmp_gainmap_bigendian.jpg
  41. paris_exif_xmp_gainmap_littleendian.jpg
  42. paris_exif_xmp_icc.jpg
  43. paris_exif_xmp_icc_gainmap_bigendian.jpg
  44. paris_extended_xmp.jpg
  45. paris_icc_exif_xmp.avif
  46. paris_icc_exif_xmp.png
  47. paris_icc_exif_xmp_at_end.png
  48. paris_xmp_trailing_null.jpg
  49. README.md
  50. seine_hdr_gainmap_small_srgb.avif
  51. seine_hdr_gainmap_srgb.avif
  52. seine_hdr_rec2020.avif
  53. seine_hdr_srgb.avif
  54. seine_sdr_gainmap_big_srgb.avif
  55. seine_sdr_gainmap_srgb.avif
  56. seine_sdr_gainmap_srgb.jpg
  57. sofa_grid1x5_420.avif
  58. sRGB2014.icc
  59. weld_16bit.png
  60. white_1x1.avif
tests/data/README.md

Test images

Still images

File circle-trns-after-plte.png

An opaque blue circle on a transparent green background.

It is of color type 2 (PNG_COLOR_TYPE_RGB) and has a tRNS chunk after a PLTE chunk.

File circle-trns-before-plte.png

An opaque blue circle on a transparent green background.

It is of color type 2 (PNG_COLOR_TYPE_RGB) and has a tRNS chunk before a PLTE chunk. Since the PNG specification version 1.2 says “the tRNS chunk [...] must follow the PLTE chunk, if any”, libpng considers the tRNS chunk as invalid and ignores it.

File draw_points.png

Source: Generated with ImageMagick's convert command:

  convert -size 3x1 xc:red -alpha on -fill '#00F8' \
          -draw 'point 1,0' \
          -draw 'color 2,0 point' -scale 33x33 draw_points.png

It is of color type 3 (PNG_COLOR_TYPE_PALETTE) and has a tRNS chunk.

File white_1x1.avif

License: same as libavif

Source: single white pixel encoded with libavif at default quality.

Files kodim*

File kodim03_yuv420_8bpc.avif

License: released by the Eastman Kodak Company for unrestricted usage

File kodim03_grayscale_gamma1.6.png

License: released by the Eastman Kodak Company for unrestricted usage

It is kodim03_yuv420_8bpc.avif converted to grayscale and tagged as Gamma 1.6 gAMA PNG chunk.

File kodim03_grayscale_gamma1.6-reference.png

License: released by the Eastman Kodak Company for unrestricted usage

It is kodim03_grayscale_gamma1.6.png converted into sRGB colorspace by Chrome using “Capture Node Screenshot” in DevTools.

File kodim23_yuv420_8bpc.avif

License: released by the Eastman Kodak Company for unrestricted usage

Source: http://r0k.us/graphics/kodak/

Files cosmos*

File cosmos1650_yuv444_10bpc_p3pq.avif

License: Creative Commons Attribution license (reuse allowed)

Source: “Cosmos Laundromat” movie (frame at around 1 minute past the beginning)

Files with high bit depth per channel

File weld_16bit.png

License: “Irrevocable, nonexclusive, worldwide copyright license to download, copy, modify, distribute, perform, and use raw files from Signature Edits for free, including for commercial purposes, without permission from or attributing the photographer or Signature Edits.”

Source: Picture from https://www.signatureedits.com/free-raw-photos/, rescaled, modified color balance and converted with GIMP+Darktable to 16b PNG, metadata removed with exiftool -All=.

Metadata

The structure can be displayed using exiv2 -pS <file>.

File dog_exif_extended_xmp_icc.jpg

License: same as libavif

Source: Personal photo.

addressmarkerlengthdata
00xffd8 SOI
20xffe1 APP1884Exif..II*......................
8880xffe1 APP1353http://ns.adobe.com/xap/1.0/.<x:
12430xffe1 APP132417http://ns.adobe.com/xmp/extensio
336620xffe0 APP016JFIF.........
...
338180xffe2 APP2612ICC_PROFILE......T........mntrRG chunk 1/1
...

File paris_exif_xmp_icc.jpg

License: same as libavif

Source: Personal photo edited with Gimp 2.10.

addressmarkerlengthdata
00xffd8 SOI
20xffe0 APP016JFIF.....,.,.
200xffe1 APP11134Exif..II*......................
11560xffe1 APP13929http://ns.adobe.com/xap/1.0/.<?x
50870xffe2 APP2612ICC_PROFILE......T........mntrRG chunk 1/1
...

File paris_extended_xmp.jpg

License: same as libavif

Source: Metadata was extracted from paris_exif_xmp_icc.jpg with exiftool -tagsfromfile paris_exif_xmp_icc.jpg paris_exif_xmp_icc.xmp. The text of the first book of De finibus bonorum et malorum was manually inserted in that file under the tag xmp:Label and the second book under the tag xmp:Nickname (any < or > removed to avoid conflicts with XMP). The file was reconstructed with exiftool -tagsfromfile paris_exif_xmp_icc.xmp -Exif= -icc_profile= paris_exif_xmp_icc.jpg -o paris_extended_xmp.jpg. The goal is to have a large XMP blob so that it can only be stored as multiple extended XMP chunks.

addressmarkerlengthdata
00xffd8 SOI
20xffe0 APP016JFIF.....,.,.
200xffe1 APP15531http://ns.adobe.com/xap/1.0/.<?x
55530xffe1 APP165535http://ns.adobe.com/xmp/extensio
710900xffe1 APP165535http://ns.adobe.com/xmp/extensio
1366270xffe1 APP14791http://ns.adobe.com/xmp/extensio
...

File paris_xmp_trailing_null.jpg

License: same as libavif

Source: paris_exif_xmp_icc.jpg loaded with avifReadImage(), stripped of ICC and Exif, a zero byte appended to XMP, then written with avifJPEGWrite() with quality 0 (without calling avifImageFixXMP()).

addressmarkerlengthdata
00xffd8 SOI
20xffe0 APP016JFIF.........
200xffe1 APP13930http://ns.adobe.com/xap/1.0/.<?x
...

File paris_icc_exif_xmp.png

License: same as libavif

Source: paris_exif_xmp_icc.jpg loaded with avifReadImage() then written with avifPNGWrite() (modified to output metadata this way).

addressmarkerlengthdata
8IHDR13
33iCCP386libavif..(.u..+DQ..?3...E.....
431zTXt631Raw profile type exif..H...[..
1074zTXt1076Raw profile type xmp..X..YQ..8
2162IDAT...
160456IEND0

File paris_icc_exif_xmp_at_end.png

License: same as libavif

Source: paris_exif_xmp_icc.jpg loaded with avifReadImage() then written with avifPNGWrite() (modified to output metadata this way).

addressmarkerlengthdata
8IHDR13
33iCCP386libavif..(.u..+DQ..?3...E.....
2162IDAT...
151474eXIf1126II*..........................
152612tEXt7832Raw profile type xmp..XMP.0000
160456IEND0

File paris_exif_orientation_5.jpg

License: same as libavif

Source: paris_exif_xmp_icc.jpg stripped of all metadata with exiftool -all= and Exif orientation added with exiv2 -k -M "set Exif.Image.Orientation 5"

addressmarkerlengthdata
00xffd8 SOI
20xffe1 APP134Exif..II*......................
...

File paris_icc_exif_xmp.avif

License: same as libavif

Source: Encoded from paris_icc_exif_xmp.png using avifenc -s 10 at commit ed52c1b.

File ffffcc-gamma1.6.png

License: Creative Commons Attribution-NonCommercial 2.5 License

Source: Picture from the libpng test page http://www.libpng.org/pub/png/colorcube/colorcube-pngs-gamma16.html.

It's a color image tagged as gamma 1.6.

File ffffcc-gamma1.6.png

License: Creative Commons Attribution-NonCommercial 2.5 License

Source: Picture from the libpng test page http://www.libpng.org/pub/png/colorcube/colorcube-pngs-gamma22.html.

It's a color image tagged as gamma 2.2.

File ffffff-gamma1.6.png

License: Creative Commons Attribution-NonCommercial 2.5 License

Source: Picture from the libpng test page http://www.libpng.org/pub/png/colorcube/colorcube-pngs-gamma16.html.

It's a grayscale image tagged as gamma 1.6.

File ffffff-gamma2.2.png

License: Creative Commons Attribution-NonCommercial 2.5 License

Source: Picture from the libpng test page http://www.libpng.org/pub/png/colorcube/colorcube-pngs-gamma22.html.

It's a grayscale image tagged as gamma 2.2.

File ffffcc-srgb.png

License: Creative Commons Attribution-NonCommercial 2.5 License

Source: Picture from the libpng test page http://www.libpng.org/pub/png/colorcube/colorcube-pngs-sRGB.html.

It's a color image tagged as sRGB.

File ArcTriomphe-cHRM-orig.png

License: Creative Commons Attribution-NonCommercial 2.5 License

Source: Picture from the libpng test page http://www.libpng.org/pub/png/png-colortest.html.

It's a image tagged as gamma 2.2 and BT709 primaries.

File ArcTriomphe-cHRM-red-green-swap.png

License: Creative Commons Attribution-NonCommercial 2.5 License

Source: Picture from the libpng test page http://www.libpng.org/pub/png/png-colortest.html.

It's a image tagged as gamma 2.2 and BT709 primaries but red and green swapped.

File ArcTriomphe-cHRM-red-green-swap-reference.png

License: Creative Commons Attribution-NonCommercial 2.5 License

Source: Picture from the libpng test page http://www.libpng.org/pub/png/png-colortest.html.

It's ArcTriomphe-cHRM-red-green-swap.png converted into sRGB colorspace by Chrome using “Capture Node Screenshot” in DevTools.

Grid

File sofa_grid1x5_420.avif

License: same as libavif

Source: Personal photo converted with avifenc --grid 1x5 --yuv 420 at commit 632d131.

File color_grid_alpha_nogrid.avif

License: same as libavif

Source: https://github.com/AOMediaCodec/libavif/issues/1203

The color planes are arranged as a 1x2 grid item. The alpha plane items are tagged as dimg for each color plane item (without a grid item on its own). This is allowed per the specification. libavif should decode such files correctly (i.e.) it should report them as files with alpha channel.

Box structure of the items in this file:

[primary item grid]
   ^       ^
   |dimg   |dimg
   |       |
[color] [color]
   ^       ^
   |auxl   |auxl
   |       |
[alpha] [alpha]

File alpha_noispe.avif

License: same as libavif

Source: Same pixels as color_grid_alpha_nogrid.avif encoded with cavif-rs with the alpha ispe fix removed.

Gain Maps

File paris_exif_xmp_gainmap_littleendian.jpg

License: same as libavif

Source: Based on paris_exif_xmp_icc.jpg with ICC stripped out and a gain map added. Contains a MPF (Multi-Picture Format) segment with metadata pointing to a second image at offset 33487. The MPF metadata is in little endian order, as signaled by the four bytes ‘II*\0’.

addressmarkerlengthdata
00xffd8 SOI
20xffe0 APP016JFIF.....,.,.
200xffe1 APP1838Exif..II*......................
11560xffe1 APP12808http://ns.adobe.com/xap/1.0/.<?x
36700xffe1 APP1392http://ns.adobe.com/xmp/extension/
40640xffe2 APP288MPF..II*.....
...
334870xffd8 SOI
334890xffe0 APP016JFIF.....,.,.
335070xffe1 APP1571http://ns.adobe.com/xap/1.0/.<?x
...

File paris_exif_xmp_gainmap_bigendian.jpg

License: same as libavif

Source: Same as paris_exif_xmp_gainmap_littleendian.jpg but manually edited with a hex editor to make the MPF metadata big endian, as signaled by the four bytes ‘MM\0*’.

addressmarkerlengthdata
00xffd8 SOI
20xffe0 APP016JFIF.....,.,.
200xffe1 APP1838Exif..II*......................
11560xffe1 APP12808http://ns.adobe.com/xap/1.0/.<?x
36700xffe1 APP1392http://ns.adobe.com/xmp/extension/
40640xffe2 APP288MPF..MM.*....
...
334870xffd8 SOI
334890xffe0 APP016JFIF.....,.,.
335070xffe1 APP1571http://ns.adobe.com/xap/1.0/.<?x
...

File paris_exif_xmp_icc_gainmap_bigendian.jpg

License: same as libavif

Source: same as paris_exif_xmp_gainmap_bigendian.jpg but with a DCI-P3 ICC profile added using exiftool:

cp paris_exif_xmp_gainmap_bigendian.jpg paris_exif_xmp_icc_gainmap_bigendian.jpg
exiftool -icc_profile -b path/to/some_image_with_a_p3_profile.jpg > p3.icc
exiftool "-icc_profile<=p3.icc" paris_exif_xmp_icc_gainmap_bigendian.jpg

File color_grid_gainmap_different_grid.avif

License: same as libavif

Source: generated with a modified libavif at https://github.com/maryla-uc/libavif/tree/weirdgainmaps

Contains a 4x3 color grid, a 4x3 alpha grid, and a 2x2 gain map grid.

File color_nogrid_alpha_nogrid_gainmap_grid.avif

License: same as libavif

Source: generated with a modified libavif at https://github.com/maryla-uc/libavif/tree/weirdgainmaps

Contains a single color image, single alpha image, and a 2x2 gain map grid.

File color_grid_alpha_grid_gainmap_nogrid.avif

License: same as libavif

Source: generated with a modified libavif at https://github.com/maryla-uc/libavif/tree/weirdgainmaps

Contains a 4x3 color grid, a 4x3 alpha grid, and a single gain map image.

File seine_hdr_srgb.avif

License: same as libavif

Source : created from a personal photo, converted to HDR using Photoshop, see https://helpx.adobe.com/camera-raw/using/hdr-output.html and https://gregbenzphotography.com/hdr-images/jpg-hdr-gain-maps-in-adobe-camera-raw/

See also sources/seine.psd

HDR image using the PQ transfer curve. Contains a gain map in Adobe's format that is not recognized by libavif and ignored by the tests.

File seine_sdr_gainmap_srgb.jpg

License: same as libavif

Source : created from a personal photo, converted to HDR using Photoshop, then saved as JPEG+gainmap, see https://helpx.adobe.com/camera-raw/using/hdr-output.html and https://gregbenzphotography.com/hdr-images/jpg-hdr-gain-maps-in-adobe-camera-raw/

File seine_hdr_rec2020.avif

License: same as libavif

Source : same as seine_hdr_srgb but saved with the Rec. 2020 color space in Photoshop (Camera Raw 16.0.1.1683).

File seine_sdr_gainmap_srgb.avif

License: same as libavif

Source : created from seine_sdr_gainmap_srgb.jpg converted to avif with avifenc built with AVIF_ENABLE_EXPERIMENTAL_GAIN_MAP and AVIF_ENABLE_LIBXML2 then:

# from libavif/mybuilddir/
./avifenc ../tests/data/seine_sdr_gainmap_srgb.jpg ../tests/data/seine_sdr_gainmap_srgb.avif --qcolor 90 --qgain-map 90 --ignore-icc

SDR image with a gain map to allow tone mapping to HDR.

File seine_sdr_gainmap_big_srgb.avif

Source : modified version of seine_sdr_gainmap_srgb.avif with an upscaled gain map, generated using libavif's API. See CreateTestImages in avifgainmaptest.cc (set kUpdateTestImages to update images).

SDR image with a gain map to allow tone mapping to HDR. The gain map's width and height are doubled compared to the base image. This is an atypical image just for testing. Typically, the gain map would be either the same size or smaller as the base image.

File seine_hdr_gainmap_srgb.avif

License: same as libavif

Source : created from seine_hdr_srgb.avif (for the base image) and seine_sdr_gainmap_srgb.avif (for the gain map) with libavif's API. See CreateTestImages in avifgainmaptest.cc (set kUpdateTestImages to update images).

HDR image with a gain map to allow tone mapping to SDR.

File seine_hdr_gainmap_small_srgb.avif

License: same as libavif

Source : modified version of seine_hdr_gainmap_srgb.avif with a downscaled gain map, generated using libavif's API. See CreateTestImages in avifgainmaptest.cc (set kUpdateTestImages to update images).

SDR image with a gain map to allow tone mapping to HDR. The gain map's width and height are halved compared to the base image.

Files colors*hdr.avif and colors_sdr_srgb.avif

SDR and HDR (PQ) AVIF images in various colorspaces. The files with ‘wcg’ (wide color gamut) in their name have colors outside of the sRGB color space. The files without ‘wcg’ in their name have sRGB colors, but expressed in various color spaces.

The files with ‘text’ in their name have text on them. They are not currently used in tests but can be used for manual testing of gain maps (e.g. with avifgainmaputil combine ...), as they make it easy to see which version the browser is displaying.

HDR/wide color gamut images should be viewed on an HDR display, such as on a M1+ Mac Book Pro.

Source : created with Photoshop 25.1.0 (Camera Raw 16.0.1.1683), see sources/colors.psd and https://helpx.adobe.com/camera-raw/using/hdr-output.html, https://gregbenzphotography.com/hdr-images/jpg-hdr-gain-maps-in-adobe-camera-raw/

Basic process: create a 32bit image, export it as png for the SDR version. Then open the Camera Raw filter (Filter > Camera Raw Filter...), click HDR at the top right, and drag the histogram towards the right to create brighter pixels. Click the save icon on the top right. Select AVIF as output format and check “HDR output” then save. To create an image with a wider color gamut, choose Edit > Assign Profile... and set the color space to e.g. BT 2020.

To export more images from sources/colors.psd:

  • For SDR, show/hide the layers as desired then export to PNG then convert to avif with avifenc
  • For HDR, show/hide the layers as desired then flatten the image, (Layers > Flatten Image), open the Camera Raw dialog, and click the save icon on the top right.
  • For the wide color gamut version, choose Edit > Assign Profile... and set the color space to Rec.ITU-R BT.2020-1

Animated Images

File colors-animated-8bpc.avif

License: same as libavif

Source: Random colors generated with ffmpeg.

An animated AVIF image file with the following attributes:

  • Width: 150
  • Height: 150
  • Alpha present: No
  • YUV Format: 420
  • Repetition Count: 0
  • Frame count: 5

File colors-animated-8bpc-alpha-exif-xmp.avif

License: same as libavif

Source: colors-animated-8bpc.avif but translucent and with the Exif/XMP chunks of paris_exif_xmp_icc.jpg. The repetition is infinite.

Other Test Files

File sRGB2014.icc

License: Copyright International Color Consortium, 2015

Source: https://www.color.org/srgbprofiles.xalter#v2