Skip to content

Commit

Permalink
Added all official PNG test suite images.
Browse files Browse the repository at this point in the history
  • Loading branch information
wvanbergen committed Oct 31, 2010
1 parent 8eafcc2 commit e8b74bf
Show file tree
Hide file tree
Showing 218 changed files with 147 additions and 0 deletions.
Binary file added spec/png_suite/background_chunks/bgai4a08.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added spec/png_suite/background_chunks/bgai4a16.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added spec/png_suite/background_chunks/bgan6a08.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added spec/png_suite/background_chunks/bgan6a16.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added spec/png_suite/background_chunks/bgbn4a08.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added spec/png_suite/background_chunks/bggn4a16.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added spec/png_suite/background_chunks/bgwn6a08.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added spec/png_suite/background_chunks/bgyn6a16.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added spec/png_suite/basic/basi0g01.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added spec/png_suite/basic/basi0g01.rgba
Binary file not shown.
Binary file added spec/png_suite/basic/basi0g02.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added spec/png_suite/basic/basi0g02.rgba
Binary file not shown.
Binary file added spec/png_suite/basic/basi0g04.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added spec/png_suite/basic/basi0g04.rgba
Binary file not shown.
Binary file added spec/png_suite/basic/basi0g08.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added spec/png_suite/basic/basi0g08.rgba
Binary file not shown.
Binary file added spec/png_suite/basic/basi0g16.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added spec/png_suite/basic/basi0g16.rgba
Binary file not shown.
Binary file added spec/png_suite/basic/basi2c08.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added spec/png_suite/basic/basi2c08.rgba
Binary file not shown.
Binary file added spec/png_suite/basic/basi2c16.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added spec/png_suite/basic/basi2c16.rgba
Binary file not shown.
Binary file added spec/png_suite/basic/basi3p01.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions spec/png_suite/basic/basi3p01.rgba
@@ -0,0 +1 @@
��"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f��"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"���"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f��"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"���"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f��"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"���"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f��"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�
Binary file added spec/png_suite/basic/basi3p02.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added spec/png_suite/basic/basi3p02.rgba
Binary file not shown.
Binary file added spec/png_suite/basic/basi3p04.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added spec/png_suite/basic/basi3p04.rgba
Binary file not shown.
Binary file added spec/png_suite/basic/basi3p08.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added spec/png_suite/basic/basi3p08.rgba
Binary file not shown.
Binary file added spec/png_suite/basic/basi4a08.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added spec/png_suite/basic/basi4a08.rgba
Binary file not shown.
Binary file added spec/png_suite/basic/basi4a16.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added spec/png_suite/basic/basi4a16.rgba
Binary file not shown.
Binary file added spec/png_suite/basic/basi6a08.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added spec/png_suite/basic/basi6a08.rgba
Binary file not shown.
Binary file added spec/png_suite/basic/basi6a16.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added spec/png_suite/basic/basi6a16.rgba
Binary file not shown.
Binary file added spec/png_suite/basic/basn0g01.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added spec/png_suite/basic/basn0g01.rgba
Binary file not shown.
Binary file added spec/png_suite/basic/basn0g02.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added spec/png_suite/basic/basn0g02.rgba
Binary file not shown.
Binary file added spec/png_suite/basic/basn0g04.png
Binary file added spec/png_suite/basic/basn0g04.rgba
Binary file not shown.
Binary file added spec/png_suite/basic/basn0g08.png
Binary file added spec/png_suite/basic/basn0g08.rgba
Binary file not shown.
Binary file added spec/png_suite/basic/basn0g16.png
Binary file added spec/png_suite/basic/basn0g16.rgba
Binary file not shown.
Binary file added spec/png_suite/basic/basn2c08.png
Binary file added spec/png_suite/basic/basn2c08.rgba
Binary file not shown.
Binary file added spec/png_suite/basic/basn2c16.png
Binary file added spec/png_suite/basic/basn2c16.rgba
Binary file not shown.
Binary file added spec/png_suite/basic/basn3p01.png
1 change: 1 addition & 0 deletions spec/png_suite/basic/basn3p01.rgba
@@ -0,0 +1 @@
��"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f��"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"���"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f��"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"���"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f��"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"���"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f��"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�"f��"f��"f��"f����"���"���"���"�
Binary file added spec/png_suite/basic/basn3p02.png
Binary file added spec/png_suite/basic/basn3p02.rgba
Binary file not shown.
Binary file added spec/png_suite/basic/basn3p04.png
Binary file added spec/png_suite/basic/basn3p04.rgba
Binary file not shown.
Binary file added spec/png_suite/basic/basn3p08.png
Binary file added spec/png_suite/basic/basn3p08.rgba
Binary file not shown.
Binary file added spec/png_suite/basic/basn4a08.png
Binary file added spec/png_suite/basic/basn4a08.rgba
Binary file not shown.
Binary file added spec/png_suite/basic/basn4a16.png
Binary file added spec/png_suite/basic/basn4a16.rgba
Binary file not shown.
Binary file added spec/png_suite/basic/basn6a08.png
Binary file added spec/png_suite/basic/basn6a08.rgba
Binary file not shown.
Binary file added spec/png_suite/basic/basn6a16.png
Binary file added spec/png_suite/basic/basn6a16.rgba
Binary file not shown.
Binary file added spec/png_suite/broken/x00n0g01.png
Binary file added spec/png_suite/broken/xcrn0g04.png
13 changes: 13 additions & 0 deletions spec/png_suite/broken/xlfn0g04.png
Binary file added spec/png_suite/chunk_ordering/oi1n0g16.png
Binary file added spec/png_suite/chunk_ordering/oi1n2c16.png
Binary file added spec/png_suite/chunk_ordering/oi2n0g16.png
Binary file added spec/png_suite/chunk_ordering/oi2n2c16.png
Binary file added spec/png_suite/chunk_ordering/oi4n0g16.png
Binary file added spec/png_suite/chunk_ordering/oi4n2c16.png
Binary file added spec/png_suite/chunk_ordering/oi9n0g16.png
Binary file added spec/png_suite/chunk_ordering/oi9n2c16.png
Binary file added spec/png_suite/compression_levels/z00n2c08.png
Binary file added spec/png_suite/compression_levels/z03n2c08.png
Binary file added spec/png_suite/compression_levels/z06n2c08.png
Binary file added spec/png_suite/compression_levels/z09n2c08.png
Binary file added spec/png_suite/filtering/f00n0g08.png
Binary file added spec/png_suite/filtering/f00n0g08.rgba
Binary file not shown.
Binary file added spec/png_suite/filtering/f00n0g08_reference.png
Binary file not shown.
Binary file added spec/png_suite/filtering/f00n2c08.png
Binary file added spec/png_suite/filtering/f00n2c08.rgba
Binary file not shown.
Binary file added spec/png_suite/filtering/f00n2c08_reference.png
Binary file not shown.
Binary file added spec/png_suite/filtering/f01n0g08.png
Binary file added spec/png_suite/filtering/f01n0g08.rgba
Binary file not shown.
Binary file added spec/png_suite/filtering/f01n0g08_reference.png
Binary file not shown.
Binary file added spec/png_suite/filtering/f01n2c08.png
Binary file added spec/png_suite/filtering/f01n2c08.rgba
Binary file not shown.
Binary file added spec/png_suite/filtering/f01n2c08_reference.png
Binary file not shown.
Binary file added spec/png_suite/filtering/f02n0g08.png
Binary file added spec/png_suite/filtering/f02n0g08.rgba
Binary file not shown.
Binary file added spec/png_suite/filtering/f02n0g08_reference.png
Binary file not shown.
Binary file added spec/png_suite/filtering/f02n2c08.png
Binary file added spec/png_suite/filtering/f02n2c08.rgba
Binary file not shown.
Binary file added spec/png_suite/filtering/f02n2c08_reference.png
Binary file not shown.
Binary file added spec/png_suite/filtering/f03n0g08.png
Binary file added spec/png_suite/filtering/f03n0g08.rgba
Binary file not shown.
Binary file added spec/png_suite/filtering/f03n0g08_reference.png
Binary file not shown.
Binary file added spec/png_suite/filtering/f03n2c08.png
Binary file added spec/png_suite/filtering/f03n2c08.rgba
Binary file not shown.
Binary file added spec/png_suite/filtering/f03n2c08_reference.png
Binary file not shown.
Binary file added spec/png_suite/filtering/f04n0g08.png
Binary file added spec/png_suite/filtering/f04n0g08.rgba
Binary file not shown.
Binary file added spec/png_suite/filtering/f04n0g08_reference.png
Binary file not shown.
Binary file added spec/png_suite/filtering/f04n2c08.png
Binary file added spec/png_suite/filtering/f04n2c08.rgba
Binary file not shown.
Binary file added spec/png_suite/filtering/f04n2c08_reference.png
Binary file not shown.
Binary file added spec/png_suite/gamma/g03n0g16.png
Binary file added spec/png_suite/gamma/g03n2c08.png
Binary file added spec/png_suite/gamma/g03n3p04.png
Binary file added spec/png_suite/gamma/g04n0g16.png
Binary file added spec/png_suite/gamma/g04n2c08.png
Binary file added spec/png_suite/gamma/g04n3p04.png
Binary file added spec/png_suite/gamma/g05n0g16.png
Binary file added spec/png_suite/gamma/g05n2c08.png
Binary file added spec/png_suite/gamma/g05n3p04.png
Binary file added spec/png_suite/gamma/g07n0g16.png
Binary file added spec/png_suite/gamma/g07n2c08.png
Binary file added spec/png_suite/gamma/g07n3p04.png
Binary file added spec/png_suite/gamma/g10n0g16.png
Binary file added spec/png_suite/gamma/g10n2c08.png
Binary file added spec/png_suite/gamma/g10n3p04.png
Binary file added spec/png_suite/gamma/g25n0g16.png
Binary file added spec/png_suite/gamma/g25n2c08.png
Binary file added spec/png_suite/gamma/g25n3p04.png
Binary file added spec/png_suite/metadata/cm0n0g04.png
Binary file added spec/png_suite/metadata/cm7n0g04.png
Binary file added spec/png_suite/metadata/cm9n0g04.png
Binary file added spec/png_suite/other/ccwn2c08.png
Binary file added spec/png_suite/other/ccwn3p08.png
Binary file added spec/png_suite/other/cdfn2c08.png
Binary file added spec/png_suite/other/cdhn2c08.png
Binary file added spec/png_suite/other/cdsn2c08.png
Binary file added spec/png_suite/other/cdun2c08.png
Binary file added spec/png_suite/other/ch1n3p04.png
Binary file added spec/png_suite/other/ch2n3p08.png
Binary file added spec/png_suite/other/cs3n2c16.png
Binary file added spec/png_suite/other/cs3n3p08.png
Binary file added spec/png_suite/other/cs5n2c08.png
Binary file added spec/png_suite/other/cs5n3p08.png
Binary file added spec/png_suite/other/cs8n2c08.png
Binary file added spec/png_suite/other/cs8n3p08.png
Binary file added spec/png_suite/other/ct0n0g04.png
Binary file added spec/png_suite/other/ct1n0g04.png
Binary file added spec/png_suite/other/ctzn0g04.png
Binary file added spec/png_suite/other/pp0n2c16.png
Binary file added spec/png_suite/other/pp0n6a08.png
Binary file added spec/png_suite/other/ps1n0g08.png
Binary file added spec/png_suite/other/ps1n2c16.png
Binary file added spec/png_suite/other/ps2n0g08.png
Binary file added spec/png_suite/other/ps2n2c16.png
Binary file added spec/png_suite/sizes/s01i3p01.png
Binary file added spec/png_suite/sizes/s01n3p01.png
Binary file added spec/png_suite/sizes/s02i3p01.png
Binary file added spec/png_suite/sizes/s02n3p01.png
Binary file added spec/png_suite/sizes/s03i3p01.png
Binary file added spec/png_suite/sizes/s03n3p01.png
Binary file added spec/png_suite/sizes/s04i3p01.png
Binary file added spec/png_suite/sizes/s04n3p01.png
Binary file added spec/png_suite/sizes/s05i3p02.png
Binary file added spec/png_suite/sizes/s05n3p02.png
Binary file added spec/png_suite/sizes/s06i3p02.png
Binary file added spec/png_suite/sizes/s06n3p02.png
Binary file added spec/png_suite/sizes/s07i3p02.png
Binary file added spec/png_suite/sizes/s07n3p02.png
Binary file added spec/png_suite/sizes/s08i3p02.png
Binary file added spec/png_suite/sizes/s08n3p02.png
Binary file added spec/png_suite/sizes/s09i3p02.png
Binary file added spec/png_suite/sizes/s09n3p02.png
Binary file added spec/png_suite/sizes/s32i3p04.png
Binary file added spec/png_suite/sizes/s32n3p04.png
Binary file added spec/png_suite/sizes/s33i3p04.png
Binary file added spec/png_suite/sizes/s33n3p04.png
Binary file added spec/png_suite/sizes/s34i3p04.png
Binary file added spec/png_suite/sizes/s34n3p04.png
Binary file added spec/png_suite/sizes/s35i3p04.png
Binary file added spec/png_suite/sizes/s35n3p04.png
Binary file added spec/png_suite/sizes/s36i3p04.png
Binary file added spec/png_suite/sizes/s36n3p04.png
Binary file added spec/png_suite/sizes/s37i3p04.png
Binary file added spec/png_suite/sizes/s37n3p04.png
Binary file added spec/png_suite/sizes/s38i3p04.png
Binary file added spec/png_suite/sizes/s38n3p04.png
Binary file added spec/png_suite/sizes/s39i3p04.png
Binary file added spec/png_suite/sizes/s39n3p04.png
Binary file added spec/png_suite/sizes/s40i3p04.png
Binary file added spec/png_suite/sizes/s40n3p04.png
Binary file added spec/png_suite/transparency/tbbn1g04.png
Binary file added spec/png_suite/transparency/tbbn2c16.png
Binary file added spec/png_suite/transparency/tbbn3p08.png
Binary file added spec/png_suite/transparency/tbgn2c16.png
Binary file added spec/png_suite/transparency/tbgn3p08.png
Binary file added spec/png_suite/transparency/tbrn2c08.png
Binary file added spec/png_suite/transparency/tbwn1g16.png
Binary file added spec/png_suite/transparency/tbwn3p08.png
Binary file added spec/png_suite/transparency/tbyn3p08.png
Binary file added spec/png_suite/transparency/tp0n1g08.png
Binary file added spec/png_suite/transparency/tp0n2c08.png
Binary file added spec/png_suite/transparency/tp0n3p08.png
Binary file added spec/png_suite/transparency/tp1n3p08.png
119 changes: 119 additions & 0 deletions spec/png_suite_spec.rb
@@ -0,0 +1,119 @@
require 'spec_helper'

describe 'PNG testuite' do

context 'Decoding broken images' do
suite_files(:broken).each do |file|
it "should report #{File.basename(file)} as broken" do
lambda { ChunkyPNG::Image.from_file(file) }.should raise_error
end

it "should not report #{File.basename(file)} as unsupported" do
lambda { ChunkyPNG::Image.from_file(file) }.should_not raise_error(ChunkyPNG::NotSupported)
end
end
end

context 'Decoding unsupported images' do

# TODO: we eventually want to support these!

suite_files(:basic_not_supported).each do |file|
color_mode = file.match(/[in](\d)[apgc](\d\d)\.png$/)[1].to_i
bit_depth = file.match(/[in](\d)[apgc](\d\d)\.png$/)[2].to_i

it "should report #{File.basename(file)} (color mode: #{color_mode}, bit depth: #{bit_depth}) as unsupported" do
lambda { ChunkyPNG::Image.from_file(file) }.should raise_error(ChunkyPNG::NotSupported)
end
end
end

context 'Decoding supported images' do
suite_files(:basic, '*.png').each do |file|

reference = file.sub(/\.png$/, '.rgba')
color_mode = file.match(/[in](\d)[apgc](\d\d)\.png$/)[1].to_i
bit_depth = file.match(/[in](\d)[apgc](\d\d)\.png$/)[2].to_i

it "should decode #{File.basename(file)} (color mode: #{color_mode}, bit depth: #{bit_depth}) exactly the same as the reference image" do
decoded = ChunkyPNG::Canvas.from_file(file)
File.open(reference, 'rb:binary') { |f| decoded.to_rgba_stream.should == f.read }
end
end
end

context 'Decoding text chunks' do

it "should not find metadata in a file without text chunks" do
image = ChunkyPNG::Image.from_file(suite_file(:metadata, 'cm0n0g04.png'))
image.metadata.should be_empty
end

# it "should find metadata in a file with uncompressed text chunks" do
# image = ChunkyPNG::Image.from_file(suite_file(:metadata, 'cm7n0g04.png'))
# image.metadata.should_not be_empty
# end
#
# it "should find metadata in a file with compressed text chunks" do
# image = ChunkyPNG::Image.from_file(suite_file(:metadata, 'cm9n0g04.png'))
# image.metadata.should_not be_empty
# end
end

context 'Decoding filter methods' do
suite_files(:filtering, '*_reference.png').each do |reference_file|

file = reference_file.sub(/_reference\.png$/, '.png')
filter_method = file.match(/f(\d\d)[a-z0-9]+\.png/)[1].to_i

it "should decode #{File.basename(file)} (filter method: #{filter_method}) exactly the same as the reference image" do
decoded = ChunkyPNG::Canvas.from_file(file)
reference = ChunkyPNG::Canvas.from_file(reference_file)
decoded.should == reference
end
end
end

context 'Decoding different chunk splits' do
it "should decode grayscale images successfully regardless of the data chunk ordering and splitting" do
reference = ChunkyPNG::Datastream.from_file(suite_file(:chunk_ordering, 'oi1n0g16.png')).imagedata
ChunkyPNG::Datastream.from_file(suite_file(:chunk_ordering, 'oi2n0g16.png')).imagedata.should == reference
ChunkyPNG::Datastream.from_file(suite_file(:chunk_ordering, 'oi4n0g16.png')).imagedata.should == reference
ChunkyPNG::Datastream.from_file(suite_file(:chunk_ordering, 'oi9n0g16.png')).imagedata.should == reference
end

it "should decode color images successfully regardless of the data chunk ordering and splitting" do
reference = ChunkyPNG::Datastream.from_file(suite_file(:chunk_ordering, 'oi1n2c16.png')).imagedata
ChunkyPNG::Datastream.from_file(suite_file(:chunk_ordering, 'oi2n2c16.png')).imagedata.should == reference
ChunkyPNG::Datastream.from_file(suite_file(:chunk_ordering, 'oi4n2c16.png')).imagedata.should == reference
ChunkyPNG::Datastream.from_file(suite_file(:chunk_ordering, 'oi9n2c16.png')).imagedata.should == reference
end
end

context 'Decoding different compression levels' do
it "should decode the image successfully regardless of the compression level" do
reference = ChunkyPNG::Datastream.from_file(suite_file(:compression_levels, 'z00n2c08.png')).imagedata
ChunkyPNG::Datastream.from_file(suite_file(:compression_levels, 'z03n2c08.png')).imagedata.should == reference
ChunkyPNG::Datastream.from_file(suite_file(:compression_levels, 'z06n2c08.png')).imagedata.should == reference
ChunkyPNG::Datastream.from_file(suite_file(:compression_levels, 'z09n2c08.png')).imagedata.should == reference
end
end

context 'Decoding different sizes' do

suite_files(:sizes, '*n*.png').each do |file|
dimension = file.match(/s(\d\d)n\dp\d\d/)[1].to_i

it "should create a canvas with a #{dimension}x#{dimension} size" do
canvas = ChunkyPNG::Image.from_file(file)
canvas.width.should == dimension
canvas.height.should == dimension
end

it "should decode the #{dimension}x#{dimension} interlaced image exactly the same the non-interlaced version" do
interlaced_file = file.sub(/n3p(\d\d)\.png$/, 'i3p\\1.png')
ChunkyPNG::Image.from_file(interlaced_file).should == ChunkyPNG::Image.from_file(file)
end
end
end
end
13 changes: 13 additions & 0 deletions spec/spec_helper.rb
Expand Up @@ -7,6 +7,18 @@ module ResourceFileHelper
def resource_file(name)
File.expand_path("./resources/#{name}", File.dirname(__FILE__))
end

def suite_file(kind, file)
File.join(suite_dir(kind), file)
end

def suite_dir(kind)
File.expand_path("./png_suite/#{kind}", File.dirname(__FILE__))
end

def suite_files(kind, pattern = '*.png')
Dir[File.join(suite_dir(kind), pattern)]
end
end


Expand All @@ -27,6 +39,7 @@ def reference_image(name)
end

RSpec.configure do |config|
config.extend ResourceFileHelper
config.include ResourceFileHelper
config.include MatrixSpecHelper
end

0 comments on commit e8b74bf

Please sign in to comment.