summaryrefslogtreecommitdiffstats
path: root/tcllib/modules/png
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2016-10-27 19:39:39 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2016-10-27 19:39:39 (GMT)
commitea28451286d3ea4a772fa174483f9a7a66bb1ab3 (patch)
tree6ee9d8a7848333a7ceeee3b13d492e40225f8b86 /tcllib/modules/png
parentb5ca09bae0d6a1edce939eea03594dd56383f2c8 (diff)
parent7c621da28f07e449ad90c387344f07a453927569 (diff)
downloadblt-ea28451286d3ea4a772fa174483f9a7a66bb1ab3.zip
blt-ea28451286d3ea4a772fa174483f9a7a66bb1ab3.tar.gz
blt-ea28451286d3ea4a772fa174483f9a7a66bb1ab3.tar.bz2
Merge commit '7c621da28f07e449ad90c387344f07a453927569' as 'tcllib'
Diffstat (limited to 'tcllib/modules/png')
-rw-r--r--tcllib/modules/png/ChangeLog145
-rw-r--r--tcllib/modules/png/pkgIndex.tcl2
-rw-r--r--tcllib/modules/png/png.man141
-rw-r--r--tcllib/modules/png/png.pcx61
-rw-r--r--tcllib/modules/png/png.tcl289
-rw-r--r--tcllib/modules/png/png.test306
-rw-r--r--tcllib/modules/png/testimages/basi0g01.pngbin0 -> 217 bytes
-rw-r--r--tcllib/modules/png/testimages/basi0g02.pngbin0 -> 154 bytes
-rw-r--r--tcllib/modules/png/testimages/basi0g04.pngbin0 -> 247 bytes
-rw-r--r--tcllib/modules/png/testimages/basi0g08.pngbin0 -> 254 bytes
-rw-r--r--tcllib/modules/png/testimages/basi0g16.pngbin0 -> 299 bytes
-rw-r--r--tcllib/modules/png/testimages/basi2c08.pngbin0 -> 315 bytes
-rw-r--r--tcllib/modules/png/testimages/basi2c16.pngbin0 -> 595 bytes
-rw-r--r--tcllib/modules/png/testimages/basi3p01.pngbin0 -> 132 bytes
-rw-r--r--tcllib/modules/png/testimages/basi3p02.pngbin0 -> 193 bytes
-rw-r--r--tcllib/modules/png/testimages/basi3p04.pngbin0 -> 327 bytes
-rw-r--r--tcllib/modules/png/testimages/basi3p08.pngbin0 -> 1527 bytes
-rw-r--r--tcllib/modules/png/testimages/basi4a08.pngbin0 -> 214 bytes
-rw-r--r--tcllib/modules/png/testimages/basi4a16.pngbin0 -> 2855 bytes
-rw-r--r--tcllib/modules/png/testimages/basi6a08.pngbin0 -> 361 bytes
-rw-r--r--tcllib/modules/png/testimages/basi6a16.pngbin0 -> 4180 bytes
-rw-r--r--tcllib/modules/png/testimages/basn0g01.pngbin0 -> 164 bytes
-rw-r--r--tcllib/modules/png/testimages/basn0g02.pngbin0 -> 104 bytes
-rw-r--r--tcllib/modules/png/testimages/basn0g04.pngbin0 -> 145 bytes
-rw-r--r--tcllib/modules/png/testimages/basn0g08.pngbin0 -> 138 bytes
-rw-r--r--tcllib/modules/png/testimages/basn0g16.pngbin0 -> 167 bytes
-rw-r--r--tcllib/modules/png/testimages/basn2c08.pngbin0 -> 145 bytes
-rw-r--r--tcllib/modules/png/testimages/basn2c16.pngbin0 -> 302 bytes
-rw-r--r--tcllib/modules/png/testimages/basn3p01.pngbin0 -> 112 bytes
-rw-r--r--tcllib/modules/png/testimages/basn3p02.pngbin0 -> 146 bytes
-rw-r--r--tcllib/modules/png/testimages/basn3p04.pngbin0 -> 216 bytes
-rw-r--r--tcllib/modules/png/testimages/basn3p08.pngbin0 -> 1286 bytes
-rw-r--r--tcllib/modules/png/testimages/basn4a08.pngbin0 -> 126 bytes
-rw-r--r--tcllib/modules/png/testimages/basn4a16.pngbin0 -> 2206 bytes
-rw-r--r--tcllib/modules/png/testimages/basn6a08.pngbin0 -> 184 bytes
-rw-r--r--tcllib/modules/png/testimages/basn6a16.pngbin0 -> 3435 bytes
-rw-r--r--tcllib/modules/png/testimages/bgai4a08.pngbin0 -> 214 bytes
-rw-r--r--tcllib/modules/png/testimages/bgai4a16.pngbin0 -> 2855 bytes
-rw-r--r--tcllib/modules/png/testimages/bgan6a08.pngbin0 -> 184 bytes
-rw-r--r--tcllib/modules/png/testimages/bgan6a16.pngbin0 -> 3435 bytes
-rw-r--r--tcllib/modules/png/testimages/bgbn4a08.pngbin0 -> 140 bytes
-rw-r--r--tcllib/modules/png/testimages/bggn4a16.pngbin0 -> 2220 bytes
-rw-r--r--tcllib/modules/png/testimages/bgwn6a08.pngbin0 -> 202 bytes
-rw-r--r--tcllib/modules/png/testimages/bgyn6a16.pngbin0 -> 3453 bytes
-rw-r--r--tcllib/modules/png/testimages/ccwn2c08.pngbin0 -> 1514 bytes
-rw-r--r--tcllib/modules/png/testimages/ccwn3p08.pngbin0 -> 1554 bytes
-rw-r--r--tcllib/modules/png/testimages/cdfn2c08.pngbin0 -> 404 bytes
-rw-r--r--tcllib/modules/png/testimages/cdhn2c08.pngbin0 -> 344 bytes
-rw-r--r--tcllib/modules/png/testimages/cdsn2c08.pngbin0 -> 232 bytes
-rw-r--r--tcllib/modules/png/testimages/cdun2c08.pngbin0 -> 724 bytes
-rw-r--r--tcllib/modules/png/testimages/ch1n3p04.pngbin0 -> 258 bytes
-rw-r--r--tcllib/modules/png/testimages/ch2n3p08.pngbin0 -> 1810 bytes
-rw-r--r--tcllib/modules/png/testimages/cm0n0g04.pngbin0 -> 292 bytes
-rw-r--r--tcllib/modules/png/testimages/cm7n0g04.pngbin0 -> 292 bytes
-rw-r--r--tcllib/modules/png/testimages/cm9n0g04.pngbin0 -> 292 bytes
-rw-r--r--tcllib/modules/png/testimages/cs3n2c16.pngbin0 -> 214 bytes
-rw-r--r--tcllib/modules/png/testimages/cs3n3p08.pngbin0 -> 259 bytes
-rw-r--r--tcllib/modules/png/testimages/cs5n2c08.pngbin0 -> 186 bytes
-rw-r--r--tcllib/modules/png/testimages/cs5n3p08.pngbin0 -> 271 bytes
-rw-r--r--tcllib/modules/png/testimages/cs8n2c08.pngbin0 -> 149 bytes
-rw-r--r--tcllib/modules/png/testimages/cs8n3p08.pngbin0 -> 256 bytes
-rw-r--r--tcllib/modules/png/testimages/ct0n0g04.pngbin0 -> 273 bytes
-rw-r--r--tcllib/modules/png/testimages/ct1n0g04.pngbin0 -> 792 bytes
-rw-r--r--tcllib/modules/png/testimages/ctzn0g04.pngbin0 -> 753 bytes
-rw-r--r--tcllib/modules/png/testimages/f00n0g08.pngbin0 -> 319 bytes
-rw-r--r--tcllib/modules/png/testimages/f00n2c08.pngbin0 -> 2475 bytes
-rw-r--r--tcllib/modules/png/testimages/f01n0g08.pngbin0 -> 321 bytes
-rw-r--r--tcllib/modules/png/testimages/f01n2c08.pngbin0 -> 1180 bytes
-rw-r--r--tcllib/modules/png/testimages/f02n0g08.pngbin0 -> 355 bytes
-rw-r--r--tcllib/modules/png/testimages/f02n2c08.pngbin0 -> 1729 bytes
-rw-r--r--tcllib/modules/png/testimages/f03n0g08.pngbin0 -> 389 bytes
-rw-r--r--tcllib/modules/png/testimages/f03n2c08.pngbin0 -> 1291 bytes
-rw-r--r--tcllib/modules/png/testimages/f04n0g08.pngbin0 -> 269 bytes
-rw-r--r--tcllib/modules/png/testimages/f04n2c08.pngbin0 -> 985 bytes
-rw-r--r--tcllib/modules/png/testimages/g03n0g16.pngbin0 -> 345 bytes
-rw-r--r--tcllib/modules/png/testimages/g03n2c08.pngbin0 -> 370 bytes
-rw-r--r--tcllib/modules/png/testimages/g03n3p04.pngbin0 -> 214 bytes
-rw-r--r--tcllib/modules/png/testimages/g04n0g16.pngbin0 -> 363 bytes
-rw-r--r--tcllib/modules/png/testimages/g04n2c08.pngbin0 -> 377 bytes
-rw-r--r--tcllib/modules/png/testimages/g04n3p04.pngbin0 -> 219 bytes
-rw-r--r--tcllib/modules/png/testimages/g05n0g16.pngbin0 -> 339 bytes
-rw-r--r--tcllib/modules/png/testimages/g05n2c08.pngbin0 -> 350 bytes
-rw-r--r--tcllib/modules/png/testimages/g05n3p04.pngbin0 -> 206 bytes
-rw-r--r--tcllib/modules/png/testimages/g07n0g16.pngbin0 -> 321 bytes
-rw-r--r--tcllib/modules/png/testimages/g07n2c08.pngbin0 -> 340 bytes
-rw-r--r--tcllib/modules/png/testimages/g07n3p04.pngbin0 -> 207 bytes
-rw-r--r--tcllib/modules/png/testimages/g10n0g16.pngbin0 -> 262 bytes
-rw-r--r--tcllib/modules/png/testimages/g10n2c08.pngbin0 -> 285 bytes
-rw-r--r--tcllib/modules/png/testimages/g10n3p04.pngbin0 -> 214 bytes
-rw-r--r--tcllib/modules/png/testimages/g25n0g16.pngbin0 -> 383 bytes
-rw-r--r--tcllib/modules/png/testimages/g25n2c08.pngbin0 -> 405 bytes
-rw-r--r--tcllib/modules/png/testimages/g25n3p04.pngbin0 -> 215 bytes
-rw-r--r--tcllib/modules/png/testimages/oi1n0g16.pngbin0 -> 167 bytes
-rw-r--r--tcllib/modules/png/testimages/oi1n2c16.pngbin0 -> 302 bytes
-rw-r--r--tcllib/modules/png/testimages/oi2n0g16.pngbin0 -> 179 bytes
-rw-r--r--tcllib/modules/png/testimages/oi2n2c16.pngbin0 -> 314 bytes
-rw-r--r--tcllib/modules/png/testimages/oi4n0g16.pngbin0 -> 203 bytes
-rw-r--r--tcllib/modules/png/testimages/oi4n2c16.pngbin0 -> 338 bytes
-rw-r--r--tcllib/modules/png/testimages/oi9n0g16.pngbin0 -> 1283 bytes
-rw-r--r--tcllib/modules/png/testimages/oi9n2c16.pngbin0 -> 3038 bytes
-rw-r--r--tcllib/modules/png/testimages/pngsuite.doc520
-rw-r--r--tcllib/modules/png/testimages/pngsuite_logo.pngbin0 -> 2262 bytes
-rw-r--r--tcllib/modules/png/testimages/pp0n2c16.pngbin0 -> 962 bytes
-rw-r--r--tcllib/modules/png/testimages/pp0n6a08.pngbin0 -> 818 bytes
-rw-r--r--tcllib/modules/png/testimages/ps1n0g08.pngbin0 -> 1477 bytes
-rw-r--r--tcllib/modules/png/testimages/ps1n2c16.pngbin0 -> 1641 bytes
-rw-r--r--tcllib/modules/png/testimages/ps2n0g08.pngbin0 -> 2341 bytes
-rw-r--r--tcllib/modules/png/testimages/ps2n2c16.pngbin0 -> 2505 bytes
-rw-r--r--tcllib/modules/png/testimages/s01i3p01.pngbin0 -> 113 bytes
-rw-r--r--tcllib/modules/png/testimages/s01n3p01.pngbin0 -> 113 bytes
-rw-r--r--tcllib/modules/png/testimages/s02i3p01.pngbin0 -> 114 bytes
-rw-r--r--tcllib/modules/png/testimages/s02n3p01.pngbin0 -> 115 bytes
-rw-r--r--tcllib/modules/png/testimages/s03i3p01.pngbin0 -> 118 bytes
-rw-r--r--tcllib/modules/png/testimages/s03n3p01.pngbin0 -> 120 bytes
-rw-r--r--tcllib/modules/png/testimages/s04i3p01.pngbin0 -> 126 bytes
-rw-r--r--tcllib/modules/png/testimages/s04n3p01.pngbin0 -> 121 bytes
-rw-r--r--tcllib/modules/png/testimages/s05i3p02.pngbin0 -> 134 bytes
-rw-r--r--tcllib/modules/png/testimages/s05n3p02.pngbin0 -> 129 bytes
-rw-r--r--tcllib/modules/png/testimages/s06i3p02.pngbin0 -> 143 bytes
-rw-r--r--tcllib/modules/png/testimages/s06n3p02.pngbin0 -> 131 bytes
-rw-r--r--tcllib/modules/png/testimages/s07i3p02.pngbin0 -> 149 bytes
-rw-r--r--tcllib/modules/png/testimages/s07n3p02.pngbin0 -> 138 bytes
-rw-r--r--tcllib/modules/png/testimages/s08i3p02.pngbin0 -> 149 bytes
-rw-r--r--tcllib/modules/png/testimages/s08n3p02.pngbin0 -> 139 bytes
-rw-r--r--tcllib/modules/png/testimages/s09i3p02.pngbin0 -> 147 bytes
-rw-r--r--tcllib/modules/png/testimages/s09n3p02.pngbin0 -> 143 bytes
-rw-r--r--tcllib/modules/png/testimages/s32i3p04.pngbin0 -> 355 bytes
-rw-r--r--tcllib/modules/png/testimages/s32n3p04.pngbin0 -> 263 bytes
-rw-r--r--tcllib/modules/png/testimages/s33i3p04.pngbin0 -> 385 bytes
-rw-r--r--tcllib/modules/png/testimages/s33n3p04.pngbin0 -> 329 bytes
-rw-r--r--tcllib/modules/png/testimages/s34i3p04.pngbin0 -> 349 bytes
-rw-r--r--tcllib/modules/png/testimages/s34n3p04.pngbin0 -> 248 bytes
-rw-r--r--tcllib/modules/png/testimages/s35i3p04.pngbin0 -> 399 bytes
-rw-r--r--tcllib/modules/png/testimages/s35n3p04.pngbin0 -> 338 bytes
-rw-r--r--tcllib/modules/png/testimages/s36i3p04.pngbin0 -> 356 bytes
-rw-r--r--tcllib/modules/png/testimages/s36n3p04.pngbin0 -> 258 bytes
-rw-r--r--tcllib/modules/png/testimages/s37i3p04.pngbin0 -> 393 bytes
-rw-r--r--tcllib/modules/png/testimages/s37n3p04.pngbin0 -> 336 bytes
-rw-r--r--tcllib/modules/png/testimages/s38i3p04.pngbin0 -> 357 bytes
-rw-r--r--tcllib/modules/png/testimages/s38n3p04.pngbin0 -> 245 bytes
-rw-r--r--tcllib/modules/png/testimages/s39i3p04.pngbin0 -> 420 bytes
-rw-r--r--tcllib/modules/png/testimages/s39n3p04.pngbin0 -> 352 bytes
-rw-r--r--tcllib/modules/png/testimages/s40i3p04.pngbin0 -> 357 bytes
-rw-r--r--tcllib/modules/png/testimages/s40n3p04.pngbin0 -> 256 bytes
-rw-r--r--tcllib/modules/png/testimages/tbbn1g04.pngbin0 -> 419 bytes
-rw-r--r--tcllib/modules/png/testimages/tbbn2c16.pngbin0 -> 1994 bytes
-rw-r--r--tcllib/modules/png/testimages/tbbn3p08.pngbin0 -> 1128 bytes
-rw-r--r--tcllib/modules/png/testimages/tbgn2c16.pngbin0 -> 1994 bytes
-rw-r--r--tcllib/modules/png/testimages/tbgn3p08.pngbin0 -> 1128 bytes
-rw-r--r--tcllib/modules/png/testimages/tbrn2c08.pngbin0 -> 1347 bytes
-rw-r--r--tcllib/modules/png/testimages/tbwn1g16.pngbin0 -> 1146 bytes
-rw-r--r--tcllib/modules/png/testimages/tbwn3p08.pngbin0 -> 1131 bytes
-rw-r--r--tcllib/modules/png/testimages/tbyn3p08.pngbin0 -> 1131 bytes
-rw-r--r--tcllib/modules/png/testimages/tp0n1g08.pngbin0 -> 689 bytes
-rw-r--r--tcllib/modules/png/testimages/tp0n2c08.pngbin0 -> 1311 bytes
-rw-r--r--tcllib/modules/png/testimages/tp0n3p08.pngbin0 -> 1120 bytes
-rw-r--r--tcllib/modules/png/testimages/tp1n3p08.pngbin0 -> 1115 bytes
-rw-r--r--tcllib/modules/png/testimages/x00n0g01.pngbin0 -> 49 bytes
-rw-r--r--tcllib/modules/png/testimages/xcrn0g04.pngbin0 -> 261 bytes
-rw-r--r--tcllib/modules/png/testimages/xlfn0g04.png13
-rw-r--r--tcllib/modules/png/testimages/z00n2c08.pngbin0 -> 3172 bytes
-rw-r--r--tcllib/modules/png/testimages/z03n2c08.pngbin0 -> 232 bytes
-rw-r--r--tcllib/modules/png/testimages/z06n2c08.pngbin0 -> 224 bytes
-rw-r--r--tcllib/modules/png/testimages/z09n2c08.pngbin0 -> 224 bytes
164 files changed, 1477 insertions, 0 deletions
diff --git a/tcllib/modules/png/ChangeLog b/tcllib/modules/png/ChangeLog
new file mode 100644
index 0000000..91a83c0
--- /dev/null
+++ b/tcllib/modules/png/ChangeLog
@@ -0,0 +1,145 @@
+2013-02-01 Andreas Kupries <andreas_kupries@users.sourceforge.net>
+
+ *
+ * Released and tagged Tcllib 1.15 ========================
+ *
+
+2012-07-09 Aaron Faupell <afaupell@users.sourceforge.net>
+
+ * png.tcl: add capability to read and write images from color lists
+ * png.tcl: make crc package optional in imageInfo
+
+2011-12-13 Andreas Kupries <andreas_kupries@users.sourceforge.net>
+
+ *
+ * Released and tagged Tcllib 1.14 ========================
+ *
+
+2011-01-24 Andreas Kupries <andreas_kupries@users.sourceforge.net>
+
+ *
+ * Released and tagged Tcllib 1.13 ========================
+ *
+
+2009-12-07 Andreas Kupries <andreas_kupries@users.sourceforge.net>
+
+ *
+ * Released and tagged Tcllib 1.12 ========================
+ *
+
+2008-12-12 Andreas Kupries <andreas_kupries@users.sourceforge.net>
+
+ *
+ * Released and tagged Tcllib 1.11.1 ========================
+ *
+
+2008-10-16 Andreas Kupries <andreas_kupries@users.sourceforge.net>
+
+ *
+ * Released and tagged Tcllib 1.11 ========================
+ *
+
+2008-06-14 Andreas Kupries <andreas_kupries@users.sourceforge.net>
+
+ * png.pcx: New file. Syntax definitions for the public commands of
+ the png package.
+
+2007-09-12 Andreas Kupries <andreas_kupries@users.sourceforge.net>
+
+ *
+ * Released and tagged Tcllib 1.10 ========================
+ *
+
+2007-08-20 Andreas Kupries <andreask@activestate.com>
+
+ * png.tcl: Bumped version of package to 0.1.2.
+ * png.man:
+ * pkgIndex.tcl:
+
+2007-04-30 Andreas Kupries <andreask@activestate.com>
+
+ * png.test: Added tests for removeComments, also converted to use
+ of 'TestFilesGlob'.
+
+2004-04-28 Aaron Faupell <afaupell@users.sourceforge.net>
+
+ * png.tcl: fixed output file encoding in removeComments
+
+2007-03-21 Andreas Kupries <andreas_kupries@users.sourceforge.net>
+
+ * png.man: Fixed all warnings due to use of now deprecated
+ commands. Added a section about how to give feedback.
+
+2006-10-03 Andreas Kupries <andreas_kupries@users.sourceforge.net>
+
+ *
+ * Released and tagged Tcllib 1.9 ========================
+ *
+
+2006-01-23 Andreas Kupries <andreas_kupries@users.sourceforge.net>
+
+ * png.test: More boilerplate simplified via use of test support.
+
+2006-01-19 Andreas Kupries <andreas_kupries@users.sourceforge.net>
+
+ * png.test: Hooked into the new common test support code.
+
+2006-01-10 Andreas Kupries <andreask@activestate.com>
+
+ * png.test: Fixed [SF Tcllib Bug 1316055]. Uncluttering test
+ output.
+
+2005-10-06 Andreas Kupries <andreas_kupries@users.sourceforge.net>
+
+ *
+ * Released and tagged Tcllib 1.8 ========================
+ *
+
+2005-08-25 Andreas Kupries <andreask@activestate.com>
+
+ * png.tcl (::png::validate): Added forced truncation to 32bit when
+ * png.tcl (::png::imageInfo): reformatting a read negative crc to
+ unsigned. Otherwise this is becomes a 64bit unsigned, causing
+ bogus crc checksum failures. This fixes [Tcllib SF Bug 1042420].
+
+2004-10-05 Andreas Kupries <andreas_kupries@users.sourceforge.net>
+
+ *
+ * Released and tagged Tcllib 1.7 ========================
+ *
+
+2004-09-22 Aaron Faupell <afaupell@users.sourceforge.net>
+
+ * png.test: updated timestamp test to use gmt
+
+2004-08-25 Aaron Faupell <afaupell@users.sourceforge.net>
+
+ * png.tcl bug fix in getTimestamp, made times be interpreted as gmt.
+
+2004-08-09 Andreas Kupries <andreas_kupries@users.sourceforge.net>
+
+ * png.man: Spelling police.
+ * png.test:
+
+2004-05-22 Andreas Kupries <andreas_kupries@users.sourceforge.net>
+
+ * png.tcl: Fixed a problem with the reading of crc data from png
+ files. The 'binary scan' may return a negative integer, but the
+ check is against unsigned data. Added code to check for this and
+ compute the proper unsigned number for correct comparison.
+
+ * png.test: New file. A testsuite for the module. Incomplete.
+ Tests the validation, signature, retrieval of image information,
+ and of timestamps. The image files used are from the official
+ PNG testsuite.
+
+2004-05-20 Aaron Faupell <afaupell@users.sourceforge.net>
+
+ * png.tcl: moved file opening and signature validation to
+ a seperate proc. added isPNG command.
+ * png.man: updated to include isPNG command
+
+2004-05-07 Andreas Kupries <andreas_kupries@users.sourceforge.net>
+
+ * New module for querying PNG images, and manipulating their
+ comments, and timestamp.
diff --git a/tcllib/modules/png/pkgIndex.tcl b/tcllib/modules/png/pkgIndex.tcl
new file mode 100644
index 0000000..548da9a
--- /dev/null
+++ b/tcllib/modules/png/pkgIndex.tcl
@@ -0,0 +1,2 @@
+if {![package vsatisfies [package provide Tcl] 8.2]} {return}
+package ifneeded png 0.2 [list source [file join $dir png.tcl]]
diff --git a/tcllib/modules/png/png.man b/tcllib/modules/png/png.man
new file mode 100644
index 0000000..e65a651
--- /dev/null
+++ b/tcllib/modules/png/png.man
@@ -0,0 +1,141 @@
+[manpage_begin png n 0.1.2]
+[keywords comment]
+[keywords image]
+[keywords png]
+[keywords timestamp]
+[copyright {2004, Code: Aaron Faupell <afaupell@users.sourceforge.net>}]
+[copyright {2004, Doc: Andreas Kupries <andreas_kupries@users.sourceforge.net>}]
+[moddesc {Image manipulation}]
+[titledesc {PNG querying and manipulation of meta data}]
+[category {File formats}]
+[require Tcl 8.2]
+[require crc32]
+[require png [opt 0.1.2]]
+[description]
+[para]
+
+This package provides commands to query and modify PNG images. PNG
+stands for [term {Portable Network Graphics}] and is specified at
+[uri http://www.libpng.org/pub/png/spec/1.2].
+
+[section COMMANDS]
+[list_begin definitions]
+[call [cmd ::png::validate] [arg file]]
+
+Returns a value indicating if [arg file] is a valid PNG file. The file
+is checked for PNG signature, each chunks checksum is verified,
+existence of a data chunk is verified, first chunk is checked for
+header, last chunk is checked for ending. Things [emph not] checked
+for are: validity of values within a chunk, multiple header chunks,
+noncontiguous data chunks, end chunk before actual eof. This procedure
+can take lots of time.
+
+[para]
+Possible return values:
+
+[list_begin definitions]
+[def OK]
+File is a valid PNG file.
+[def SIG]
+no/broken PNG signature.
+[def BADLEN]
+corrupt chunk length.
+[def EOF]
+premature end of file.
+[def NOHDR]
+missing header chunk.
+[def CKSUM]
+crc mismatch.
+[def NODATA]
+missing data chunk(s).
+[def NOEND]
+missing end marker.
+[list_end]
+
+[call [cmd ::png::isPNG] [arg file]]
+
+Returns a boolean value indicating if the file [arg file] starts with
+a PNG signature. This is a much faster and less intensive check than
+[cmd ::png::validate] as it does not check if the PNG data is valid.
+
+[call [cmd ::png::imageInfo] [arg file]]
+
+Returns a dictionary with keys [const width], [const height],
+
+[const depth], [const color], [const compression], [const filter], and
+[const interlace]. The values are the associated properties of the PNG
+image in [arg file].
+
+Throws an error if file is not a PNG image, or if the checksum of the
+header is invalid. For information on interpreting the values for the
+returned properties see
+
+[uri http://www.libpng.org/pub/png/spec/1.2/PNG-Chunks.html].
+
+[call [cmd ::png::getTimestamp] [arg file]]
+
+Returns the epoch time if a timestamp chunk is found in the PNG image
+contained in the [arg file], otherwise returns the empty string. Does
+not attempt to verify the checksum of the timestamp chunk.
+
+Throws an error if the [arg file] is not a valid PNG image.
+
+[call [cmd ::png::setTimestamp] [arg file] [arg time]]
+
+Writes a new timestamp to the [arg file], either replacing the old
+timestamp, or adding one just before the data chunks if there was no
+previous timestamp. [arg time] is the new time in the gmt epoch
+format.
+
+Throws an error if [arg file] is not a valid PNG image.
+
+[call [cmd ::png::getComments] [arg file]]
+
+Currently supports only uncompressed comments. Does not attempt to
+verify the checksums of the comment chunks. Returns a list where each
+element is a comment. Each comment is itself a list. The list for a
+plain text comment consists of 2 elements: the human readable keyword,
+and the text data. A unicode (international) comment consists of 4
+elements: the human readable keyword, the language identifier, the
+translated keyword, and the unicode text data.
+
+Throws an error if [arg file] is not a valid PNG image.
+
+[call [cmd ::png::removeComments] [arg file]]
+
+Removes all comments from the PNG image in [arg file]. Beware - This
+uses memory equal to the file size minus comments, to hold the
+intermediate result.
+
+Throws an error if [arg file] is not a valid PNG image.
+
+[call [cmd ::png::addComment] [arg file] [arg keyword] [arg text]]
+
+Adds a plain [arg text] comment to the PNG image in [arg file], just
+before the first data chunk. Will throw an error if no data chunk is
+found. [arg keyword] has to be less than 80 characters long to conform
+to the PNG specification.
+
+[call [cmd ::png::addComment] [arg file] [arg keyword] [arg lang] [arg keyword2] [arg text]]
+
+Adds a unicode (international) comment to the PNG image in [arg file],
+just before the first data chunk. Will throw an error if no data chunk
+is found. [arg keyword] has to be less than 80 characters long to
+conform to the PNG specification. [arg keyword2] is the translated
+[arg keyword], in the language specified by the language identifier
+[arg lang].
+
+[call [cmd ::png::image] [arg file]]
+
+Given a PNG file returns the image in the list of scanlines format used by Tk_GetColor.
+
+[call [cmd ::png::write] [arg file] [arg data]]
+
+Takes a list of scanlines in the Tk_GetColor format and writes the represented image
+to [arg file].
+
+[list_end]
+
+[vset CATEGORY png]
+[include ../doctools2base/include/feedback.inc]
+[manpage_end]
diff --git a/tcllib/modules/png/png.pcx b/tcllib/modules/png/png.pcx
new file mode 100644
index 0000000..bbafe83
--- /dev/null
+++ b/tcllib/modules/png/png.pcx
@@ -0,0 +1,61 @@
+# -*- tcl -*- png.pcx
+# Syntax of the commands provided by package png.
+#
+# For use by TclDevKit's static syntax checker (v4.1+).
+# See http://www.activestate.com/solutions/tcl/
+# See http://aspn.activestate.com/ASPN/docs/Tcl_Dev_Kit/4.0/Checker.html#pcx_api
+# for the specification of the format of the code in this file.
+#
+
+package require pcx
+pcx::register png
+pcx::tcldep 0.1.2 needs tcl 8.2
+
+namespace eval ::png {}
+
+#pcx::message FOO {... text ...} type
+#pcx::scan <VERSION> <NAME> <RULE>
+
+pcx::check 0.1.2 std ::png::addComment \
+ {checkSimpleArgs 3 5 {
+ checkFileName
+ checkWord
+ checkWord
+ {checkSimpleArgs 2 2 {
+ checkWord
+ checkWord
+ }}
+ }}
+pcx::check 0.1.2 std ::png::getComments \
+ {checkSimpleArgs 1 1 {
+ checkFileName
+ }}
+pcx::check 0.1.2 std ::png::getTimestamp \
+ {checkSimpleArgs 1 1 {
+ checkFileName
+ }}
+pcx::check 0.1.2 std ::png::imageInfo \
+ {checkSimpleArgs 1 1 {
+ checkFileName
+ }}
+pcx::check 0.1.2 std ::png::isPNG \
+ {checkSimpleArgs 1 1 {
+ checkFileName
+ }}
+pcx::check 0.1.2 std ::png::removeComments \
+ {checkSimpleArgs 1 1 {
+ checkFileName
+ }}
+pcx::check 0.1.2 std ::png::setTimestamp \
+ {checkSimpleArgs 2 2 {
+ checkFileName
+ checkWholeNum
+ }}
+pcx::check 0.1.2 std ::png::validate \
+ {checkSimpleArgs 1 1 {
+ checkFileName
+ }}
+
+# Initialization via pcx::init.
+# Use a ::png::init procedure for non-standard initialization.
+pcx::complete
diff --git a/tcllib/modules/png/png.tcl b/tcllib/modules/png/png.tcl
new file mode 100644
index 0000000..b3d6ac1
--- /dev/null
+++ b/tcllib/modules/png/png.tcl
@@ -0,0 +1,289 @@
+# png.tcl --
+#
+# Querying and modifying PNG image files.
+#
+# Copyright (c) 2004-2012 Aaron Faupell <afaupell@users.sourceforge.net>
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+# RCS: @(#) $Id: png.tcl,v 1.11 2012/07/09 16:35:04 afaupell Exp $
+
+package provide png 0.2
+
+namespace eval ::png {}
+
+proc ::png::_openPNG {file {mode r}} {
+ set fh [open $file $mode]
+ fconfigure $fh -encoding binary -translation binary -eofchar {}
+ if {[read $fh 8] != "\x89PNG\r\n\x1a\n"} { close $fh; return -code error "not a png file" }
+ return $fh
+}
+
+proc ::png::_chunks {fh} {
+ set out [list]
+ while {[set r [read $fh 8]] != ""} {
+ binary scan $r Ia4 len type
+ lappend out [list $type [tell $fh] $len]
+ seek $fh [expr {$len + 4}] current
+ }
+ return $out
+}
+
+proc ::png::isPNG {file} {
+ if {[catch {_openPNG $file} fh]} { return 0 }
+ close $fh
+ return 1
+}
+
+proc ::png::validate {file} {
+ package require crc32
+ if {[catch {_openPNG $file} fh]} { return SIG }
+ set num 0
+ set idat 0
+ set last {}
+
+ while {[set r [read $fh 8]] != ""} {
+ binary scan $r Ia4 len type
+ if {$len < 0} { close $fh; return BADLEN }
+ set r [read $fh $len]
+ binary scan [read $fh 4] I crc
+ if {$crc < 0} {set crc [format %u [expr {$crc & 0xffffffff}]]}
+ if {[eof $fh]} { close $fh; return EOF }
+ if {($num == 0) && ($type != "IHDR")} { close $fh; return NOHDR }
+ if {$type == "IDAT"} { set idat 1 }
+ if {[::crc::crc32 $type$r] != $crc} { close $fh; return CKSUM }
+ set last $type
+ incr num
+ }
+ close $fh
+ if {!$idat} { return NODATA }
+ if {$last != "IEND"} { return NOEND }
+ return OK
+}
+
+proc ::png::imageInfo {file} {
+ set fh [_openPNG $file]
+ binary scan [read $fh 8] Ia4 len type
+ set r [read $fh $len]
+ if {![eof $fh] && $type == "IHDR"} {
+ binary scan $r IIccccc width height depth color compression filter interlace
+ binary scan [read $fh 4] I check
+ if {$check < 0} {set check [format %u [expr {$check & 0xffffffff}]]}
+ if {![catch {package present crc32}] && [::crc::crc32 IHDR$r] != $check} {
+ return -code error "header checksum failed"
+ }
+ close $fh
+ return [list width $width height $height depth $depth color $color \
+ compression $compression filter $filter interlace $interlace]
+ }
+ close $fh
+ return
+}
+
+proc ::png::getTimestamp {file} {
+ set fh [_openPNG $file]
+
+ while {[set r [read $fh 8]] != ""} {
+ binary scan $r Ia4 len type
+ if {$type == "tIME"} {
+ set r [read $fh [expr {$len + 4}]]
+ binary scan $r Sccccc year month day hour minute second
+ close $fh
+ return [clock scan "$month/$day/$year $hour:$minute:$second" -gmt 1]
+ }
+ seek $fh [expr {$len + 4}] current
+ }
+ close $fh
+ return
+}
+
+proc ::png::setTimestamp {file time} {
+ set fh [_openPNG $file r+]
+
+ set time [eval binary format Sccccc [string map {" 0" " "} [clock format $time -format "%Y %m %d %H %M %S" -gmt 1]]]
+ if {![catch {package present crc32}]} {
+ append time [binary format I [::crc::crc32 tIME$time]]
+ } else {
+ append time [binary format I 0]
+ }
+
+ while {[set r [read $fh 8]] != ""} {
+ binary scan $r Ia4 len type
+ if {[eof $fh]} { close $fh; return }
+ if {$type == "tIME"} {
+ seek $fh 0 current
+ puts -nonewline $fh $time
+ close $fh
+ return
+ }
+ if {$type == "IDAT" && ![info exists idat]} { set idat [expr {[tell $fh] - 8}] }
+ seek $fh [expr {$len + 4}] current
+ }
+ if {![info exists idat]} { close $fh; return -code error "no timestamp or data chunk found" }
+ seek $fh $idat start
+ set data [read $fh]
+ seek $fh $idat start
+ puts -nonewline $fh [binary format I 7]tIME$time$data
+ close $fh
+ return
+}
+
+proc ::png::getComments {file} {
+ set fh [_openPNG $file]
+ set text {}
+
+ while {[set r [read $fh 8]] != ""} {
+ binary scan $r Ia4 len type
+ set pos [tell $fh]
+ if {$type == "tEXt"} {
+ set r [read $fh $len]
+ lappend text [split $r \x00]
+ } elseif {$type == "iTXt"} {
+ set r [read $fh $len]
+ set keyword [lindex [split $r \x00] 0]
+ set r [string range $r [expr {[string length $keyword] + 1}] end]
+ binary scan $r cc comp method
+ if {$comp == 0} {
+ lappend text [linsert [split [string range $r 2 end] \x00] 0 $keyword]
+ }
+ }
+ seek $fh [expr {$pos + $len + 4}] start
+ }
+ close $fh
+ return $text
+}
+
+proc ::png::removeComments {file} {
+ set fh [_openPNG $file r+]
+ set data "\x89PNG\r\n\x1a\n"
+ while {[set r [read $fh 8]] != ""} {
+ binary scan $r Ia4 len type
+ if {$type == "zTXt" || $type == "iTXt" || $type == "tEXt"} {
+ seek $fh [expr {$len + 4}] current
+ } else {
+ seek $fh -8 current
+ append data [read $fh [expr {$len + 12}]]
+ }
+ }
+ close $fh
+ set fh [open $file w]
+ fconfigure $fh -encoding binary -translation binary -eofchar {}
+ puts -nonewline $fh $data
+ close $fh
+}
+
+proc ::png::addComment {file keyword arg1 args} {
+ if {[llength $args] > 0 && [llength $args] != 2} { close $fh; return -code error "wrong number of arguments" }
+ set fh [_openPNG $file r+]
+
+ if {[llength $args] > 0} {
+ set comment "iTXt$keyword\x00\x00\x00$arg1\x00[encoding convertto utf-8 [lindex $args 0]]\x00[encoding convertto utf-8 [lindex $args 1]]"
+ } else {
+ set comment "tEXt$keyword\x00$arg1"
+ }
+
+ if {![catch {package present crc32}]} {
+ append comment [binary format I [::crc::crc32 $comment]]
+ } else {
+ append comment [binary format I 0]
+ }
+
+ while {[set r [read $fh 8]] != ""} {
+ binary scan $r Ia4 len type
+ if {$type == "IDAT"} {
+ seek $fh -8 current
+ set pos [tell $fh]
+ set data [read $fh]
+ seek $fh $pos start
+ set 1 [tell $fh]
+ puts -nonewline $fh $comment
+ set clen [binary format I [expr {[tell $fh] - $1 - 8}]]
+ seek $fh $pos start
+ puts -nonewline $fh $clen$comment$data
+ close $fh
+ return
+ }
+ seek $fh [expr {$len + 4}] current
+ }
+ close $fh
+ return -code error "no data chunk found"
+}
+
+proc ::png::image {file} {
+ set fh [_openPNG $file]
+ set chunks [_chunks $fh]
+ set cdata {}
+
+ set h [lsearch -exact -index 0 -inline $chunks IHDR]
+ seek $fh [lindex $h 1] start
+ binary scan [read $fh [lindex $h 2]] IIccccc width height depth color compression filter interlace
+
+ if {$color != 2 || $compression != 0 || $depth != 8} {
+ return -code error "unsupported image format"
+ }
+
+ foreach c [lsearch -exact -index 0 -all -inline $chunks IDAT] {
+ seek $fh [lindex $c 1] start
+ append cdata [read $fh [lindex $c 2]]
+ }
+ set data [zlib decompress $cdata]
+
+ set len [string length $data]
+ set col 1
+ set offset 1
+ set row [list]
+ set out [list]
+ while {$offset < $len} {
+ binary scan $data @${offset}H2H2H2 r g b
+ lappend row "#$r$g$b"
+ incr offset 3
+ if {$col == $width} {
+ set col 1
+ incr offset
+ lappend out $row
+ set row [list]
+ continue
+ }
+ incr col
+ }
+ return $out
+}
+
+proc ::png::write {file in} {
+ set blocksize 65524
+ set chunks [list]
+ set data ""
+ lappend chunks [list IHDR [binary format IIccccc [llength [lindex $in 0]] [llength $in] 8 2 0 0 0]]
+
+ foreach row $in {
+ append data \x00
+ foreach pixel $row {
+ set pixel [string trimleft $pixel "#"]
+ append data [binary format H2H2H2 [string range $pixel 0 1] [string range $pixel 2 3] [string range $pixel 4 5]]
+ }
+ }
+ set cdata [zlib compress $data]
+ set offset 0
+ while {$offset < ([string length $cdata] + $blocksize)} {
+ lappend chunks [list IDAT [string range $cdata $offset [expr {$offset+$blocksize-1}]]]
+ incr offset $blocksize
+ }
+ #lappend chunks [list tIME [eval binary format Sccccc [clock format [clock seconds] -format "%Y %m %d %H %M %S"]]]
+ lappend chunks [list IEND ""]
+ _write $file $chunks
+}
+
+proc ::png::_write {file chunks} {
+ package require crc32
+ set fh [open $file w+]
+ fconfigure $fh -encoding binary -translation binary
+ puts -nonewline $fh "\x89PNG\r\n\x1a\n"
+ foreach chunk $chunks {
+ puts -nonewline $fh [binary format Ia4 [string length [lindex $chunk 1]] [lindex $chunk 0]]
+ puts -nonewline $fh [lindex $chunk 1]
+ puts -nonewline $fh [binary format I [::crc::crc32 [join $chunk ""]]]
+ }
+ close $fh
+ return $file
+}
diff --git a/tcllib/modules/png/png.test b/tcllib/modules/png/png.test
new file mode 100644
index 0000000..c805d4d
--- /dev/null
+++ b/tcllib/modules/png/png.test
@@ -0,0 +1,306 @@
+# -*- tcl -*-
+# png.test: tests for png decoding and manipulation.
+#
+# Copyright (c) 2004 by Andreas Kupries <andreas_kupries@users.sourceforge.net>
+#
+# RCS: @(#) $Id: png.test,v 1.10 2007/04/30 22:47:14 andreas_kupries Exp $
+
+# -------------------------------------------------------------------------
+
+source [file join \
+ [file dirname [file dirname [file join [pwd] [info script]]]] \
+ devtools testutilities.tcl]
+
+testsNeedTcl 8.2
+testsNeedTcltest 1.0
+
+# Trf / tcllibc
+support {
+ use crc/crc32.tcl crc32 ::crc
+}
+testing {
+ useLocal png.tcl png
+}
+
+# -------------------------------------------------------------------------
+# Validation
+
+foreach f [TestFilesGlob testimages/*.png] {
+ set root [file rootname [file tail $f]]
+
+ # All files have a valid signature, except for two.
+
+ test png-ispng-$root {is png} {
+ ::png::isPNG $f
+ } [expr {
+ ![string equal $root xcrn0g04] &&
+ ![string equal $root xlfn0g04]
+ }] ; # {}
+
+ # All files are fully valid, except for all beginning with an 'x'.
+
+ if {[string match x* $root]} continue
+
+ test png-validate-$root {full validation} {
+ ::png::validate $f
+ } OK ;# {}
+}
+
+# Validation II, the bad files ...
+
+foreach f [TestFilesGlob testimages/x*.png] {
+ set root [file rootname [file tail $f]]
+
+ test png-validate-$root {full validation} {
+ ::png::validate $f
+ } [expr {[string match x00n0g01 $root] ? "NODATA" : "SIG"}] ;# {}
+}
+
+
+# -------------------------------------------------------------------------
+# imageInfo ...
+
+array set expected {
+ basi0g01 {color 0 compression 0 depth 1 filter 0 height 32 interlace 1 width 32}
+ basi0g02 {color 0 compression 0 depth 2 filter 0 height 32 interlace 1 width 32}
+ basi0g04 {color 0 compression 0 depth 4 filter 0 height 32 interlace 1 width 32}
+ basi0g08 {color 0 compression 0 depth 8 filter 0 height 32 interlace 1 width 32}
+ basi0g16 {color 0 compression 0 depth 16 filter 0 height 32 interlace 1 width 32}
+ basi2c08 {color 2 compression 0 depth 8 filter 0 height 32 interlace 1 width 32}
+ basi2c16 {color 2 compression 0 depth 16 filter 0 height 32 interlace 1 width 32}
+ basi3p01 {color 3 compression 0 depth 1 filter 0 height 32 interlace 1 width 32}
+ basi3p02 {color 3 compression 0 depth 2 filter 0 height 32 interlace 1 width 32}
+ basi3p04 {color 3 compression 0 depth 4 filter 0 height 32 interlace 1 width 32}
+ basi3p08 {color 3 compression 0 depth 8 filter 0 height 32 interlace 1 width 32}
+ basi4a08 {color 4 compression 0 depth 8 filter 0 height 32 interlace 1 width 32}
+ basi4a16 {color 4 compression 0 depth 16 filter 0 height 32 interlace 1 width 32}
+ basi6a08 {color 6 compression 0 depth 8 filter 0 height 32 interlace 1 width 32}
+ basi6a16 {color 6 compression 0 depth 16 filter 0 height 32 interlace 1 width 32}
+ basn0g01 {color 0 compression 0 depth 1 filter 0 height 32 interlace 0 width 32}
+ basn0g02 {color 0 compression 0 depth 2 filter 0 height 32 interlace 0 width 32}
+ basn0g04 {color 0 compression 0 depth 4 filter 0 height 32 interlace 0 width 32}
+ basn0g08 {color 0 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
+ basn0g16 {color 0 compression 0 depth 16 filter 0 height 32 interlace 0 width 32}
+ basn2c08 {color 2 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
+ basn2c16 {color 2 compression 0 depth 16 filter 0 height 32 interlace 0 width 32}
+ basn3p01 {color 3 compression 0 depth 1 filter 0 height 32 interlace 0 width 32}
+ basn3p02 {color 3 compression 0 depth 2 filter 0 height 32 interlace 0 width 32}
+ basn3p04 {color 3 compression 0 depth 4 filter 0 height 32 interlace 0 width 32}
+ basn3p08 {color 3 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
+ basn4a08 {color 4 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
+ basn4a16 {color 4 compression 0 depth 16 filter 0 height 32 interlace 0 width 32}
+ basn6a08 {color 6 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
+ basn6a16 {color 6 compression 0 depth 16 filter 0 height 32 interlace 0 width 32}
+ bgai4a08 {color 4 compression 0 depth 8 filter 0 height 32 interlace 1 width 32}
+ bgai4a16 {color 4 compression 0 depth 16 filter 0 height 32 interlace 1 width 32}
+ bgan6a08 {color 6 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
+ bgan6a16 {color 6 compression 0 depth 16 filter 0 height 32 interlace 0 width 32}
+ bgbn4a08 {color 4 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
+ bggn4a16 {color 4 compression 0 depth 16 filter 0 height 32 interlace 0 width 32}
+ bgwn6a08 {color 6 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
+ bgyn6a16 {color 6 compression 0 depth 16 filter 0 height 32 interlace 0 width 32}
+ ccwn2c08 {color 2 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
+ ccwn3p08 {color 3 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
+ cdfn2c08 {color 2 compression 0 depth 8 filter 0 height 32 interlace 0 width 8}
+ cdhn2c08 {color 2 compression 0 depth 8 filter 0 height 8 interlace 0 width 32}
+ cdsn2c08 {color 2 compression 0 depth 8 filter 0 height 8 interlace 0 width 8}
+ cdun2c08 {color 2 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
+ ch1n3p04 {color 3 compression 0 depth 4 filter 0 height 32 interlace 0 width 32}
+ ch2n3p08 {color 3 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
+ cm0n0g04 {color 0 compression 0 depth 4 filter 0 height 32 interlace 0 width 32}
+ cm7n0g04 {color 0 compression 0 depth 4 filter 0 height 32 interlace 0 width 32}
+ cm9n0g04 {color 0 compression 0 depth 4 filter 0 height 32 interlace 0 width 32}
+ cs3n2c16 {color 2 compression 0 depth 16 filter 0 height 32 interlace 0 width 32}
+ cs3n3p08 {color 3 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
+ cs5n2c08 {color 2 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
+ cs5n3p08 {color 3 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
+ cs8n2c08 {color 2 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
+ cs8n3p08 {color 3 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
+ ct0n0g04 {color 0 compression 0 depth 4 filter 0 height 32 interlace 0 width 32}
+ ct1n0g04 {color 0 compression 0 depth 4 filter 0 height 32 interlace 0 width 32}
+ ctzn0g04 {color 0 compression 0 depth 4 filter 0 height 32 interlace 0 width 32}
+ f00n0g08 {color 0 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
+ f00n2c08 {color 2 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
+ f01n0g08 {color 0 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
+ f01n2c08 {color 2 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
+ f02n0g08 {color 0 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
+ f02n2c08 {color 2 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
+ f03n0g08 {color 0 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
+ f03n2c08 {color 2 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
+ f04n0g08 {color 0 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
+ f04n2c08 {color 2 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
+ g03n0g16 {color 0 compression 0 depth 16 filter 0 height 32 interlace 0 width 32}
+ g03n2c08 {color 2 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
+ g03n3p04 {color 3 compression 0 depth 4 filter 0 height 32 interlace 0 width 32}
+ g04n0g16 {color 0 compression 0 depth 16 filter 0 height 32 interlace 0 width 32}
+ g04n2c08 {color 2 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
+ g04n3p04 {color 3 compression 0 depth 4 filter 0 height 32 interlace 0 width 32}
+ g05n0g16 {color 0 compression 0 depth 16 filter 0 height 32 interlace 0 width 32}
+ g05n2c08 {color 2 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
+ g05n3p04 {color 3 compression 0 depth 4 filter 0 height 32 interlace 0 width 32}
+ g07n0g16 {color 0 compression 0 depth 16 filter 0 height 32 interlace 0 width 32}
+ g07n2c08 {color 2 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
+ g07n3p04 {color 3 compression 0 depth 4 filter 0 height 32 interlace 0 width 32}
+ g10n0g16 {color 0 compression 0 depth 16 filter 0 height 32 interlace 0 width 32}
+ g10n2c08 {color 2 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
+ g10n3p04 {color 3 compression 0 depth 4 filter 0 height 32 interlace 0 width 32}
+ g25n0g16 {color 0 compression 0 depth 16 filter 0 height 32 interlace 0 width 32}
+ g25n2c08 {color 2 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
+ g25n3p04 {color 3 compression 0 depth 4 filter 0 height 32 interlace 0 width 32}
+ oi1n0g16 {color 0 compression 0 depth 16 filter 0 height 32 interlace 0 width 32}
+ oi1n2c16 {color 2 compression 0 depth 16 filter 0 height 32 interlace 0 width 32}
+ oi2n0g16 {color 0 compression 0 depth 16 filter 0 height 32 interlace 0 width 32}
+ oi2n2c16 {color 2 compression 0 depth 16 filter 0 height 32 interlace 0 width 32}
+ oi4n0g16 {color 0 compression 0 depth 16 filter 0 height 32 interlace 0 width 32}
+ oi4n2c16 {color 2 compression 0 depth 16 filter 0 height 32 interlace 0 width 32}
+ oi9n0g16 {color 0 compression 0 depth 16 filter 0 height 32 interlace 0 width 32}
+ oi9n2c16 {color 2 compression 0 depth 16 filter 0 height 32 interlace 0 width 32}
+ pngsuite_logo {color 2 compression 0 depth 8 filter 0 height 256 interlace 0 width 256}
+ pp0n2c16 {color 2 compression 0 depth 16 filter 0 height 32 interlace 0 width 32}
+ pp0n6a08 {color 6 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
+ ps1n0g08 {color 0 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
+ ps1n2c16 {color 2 compression 0 depth 16 filter 0 height 32 interlace 0 width 32}
+ ps2n0g08 {color 0 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
+ ps2n2c16 {color 2 compression 0 depth 16 filter 0 height 32 interlace 0 width 32}
+ s01i3p01 {color 3 compression 0 depth 1 filter 0 height 1 interlace 1 width 1}
+ s01n3p01 {color 3 compression 0 depth 1 filter 0 height 1 interlace 0 width 1}
+ s02i3p01 {color 3 compression 0 depth 1 filter 0 height 2 interlace 1 width 2}
+ s02n3p01 {color 3 compression 0 depth 1 filter 0 height 2 interlace 0 width 2}
+ s03i3p01 {color 3 compression 0 depth 1 filter 0 height 3 interlace 1 width 3}
+ s03n3p01 {color 3 compression 0 depth 1 filter 0 height 3 interlace 0 width 3}
+ s04i3p01 {color 3 compression 0 depth 1 filter 0 height 4 interlace 1 width 4}
+ s04n3p01 {color 3 compression 0 depth 1 filter 0 height 4 interlace 0 width 4}
+ s05i3p02 {color 3 compression 0 depth 2 filter 0 height 5 interlace 1 width 5}
+ s05n3p02 {color 3 compression 0 depth 2 filter 0 height 5 interlace 0 width 5}
+ s06i3p02 {color 3 compression 0 depth 2 filter 0 height 6 interlace 1 width 6}
+ s06n3p02 {color 3 compression 0 depth 2 filter 0 height 6 interlace 0 width 6}
+ s07i3p02 {color 3 compression 0 depth 2 filter 0 height 7 interlace 1 width 7}
+ s07n3p02 {color 3 compression 0 depth 2 filter 0 height 7 interlace 0 width 7}
+ s08i3p02 {color 3 compression 0 depth 2 filter 0 height 8 interlace 1 width 8}
+ s08n3p02 {color 3 compression 0 depth 2 filter 0 height 8 interlace 0 width 8}
+ s09i3p02 {color 3 compression 0 depth 2 filter 0 height 9 interlace 1 width 9}
+ s09n3p02 {color 3 compression 0 depth 2 filter 0 height 9 interlace 0 width 9}
+ s32i3p04 {color 3 compression 0 depth 4 filter 0 height 32 interlace 1 width 32}
+ s32n3p04 {color 3 compression 0 depth 4 filter 0 height 32 interlace 0 width 32}
+ s33i3p04 {color 3 compression 0 depth 4 filter 0 height 33 interlace 1 width 33}
+ s33n3p04 {color 3 compression 0 depth 4 filter 0 height 33 interlace 0 width 33}
+ s34i3p04 {color 3 compression 0 depth 4 filter 0 height 34 interlace 1 width 34}
+ s34n3p04 {color 3 compression 0 depth 4 filter 0 height 34 interlace 0 width 34}
+ s35i3p04 {color 3 compression 0 depth 4 filter 0 height 35 interlace 1 width 35}
+ s35n3p04 {color 3 compression 0 depth 4 filter 0 height 35 interlace 0 width 35}
+ s36i3p04 {color 3 compression 0 depth 4 filter 0 height 36 interlace 1 width 36}
+ s36n3p04 {color 3 compression 0 depth 4 filter 0 height 36 interlace 0 width 36}
+ s37i3p04 {color 3 compression 0 depth 4 filter 0 height 37 interlace 1 width 37}
+ s37n3p04 {color 3 compression 0 depth 4 filter 0 height 37 interlace 0 width 37}
+ s38i3p04 {color 3 compression 0 depth 4 filter 0 height 38 interlace 1 width 38}
+ s38n3p04 {color 3 compression 0 depth 4 filter 0 height 38 interlace 0 width 38}
+ s39i3p04 {color 3 compression 0 depth 4 filter 0 height 39 interlace 1 width 39}
+ s39n3p04 {color 3 compression 0 depth 4 filter 0 height 39 interlace 0 width 39}
+ s40i3p04 {color 3 compression 0 depth 4 filter 0 height 40 interlace 1 width 40}
+ s40n3p04 {color 3 compression 0 depth 4 filter 0 height 40 interlace 0 width 40}
+ tbbn1g04 {color 0 compression 0 depth 4 filter 0 height 32 interlace 0 width 32}
+ tbbn2c16 {color 2 compression 0 depth 16 filter 0 height 32 interlace 0 width 32}
+ tbbn3p08 {color 3 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
+ tbgn2c16 {color 2 compression 0 depth 16 filter 0 height 32 interlace 0 width 32}
+ tbgn3p08 {color 3 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
+ tbrn2c08 {color 2 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
+ tbwn1g16 {color 0 compression 0 depth 16 filter 0 height 32 interlace 0 width 32}
+ tbwn3p08 {color 3 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
+ tbyn3p08 {color 3 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
+ tp0n1g08 {color 0 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
+ tp0n2c08 {color 2 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
+ tp0n3p08 {color 3 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
+ tp1n3p08 {color 3 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
+ z00n2c08 {color 2 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
+ z03n2c08 {color 2 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
+ z06n2c08 {color 2 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
+ z09n2c08 {color 2 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
+}
+
+foreach f [TestFilesGlob testimages/*.png] {
+ set root [file rootname [file tail $f]]
+
+ # Files beginning with x are invalid, and thus not usable in these
+ # tests.
+
+ if {[string match x* $root]} continue
+
+ test png-imageinfo-$root {retrieve image information} {
+ dictsort [::png::imageInfo $f]
+ } $expected($root) ; # {}
+}
+
+# -------------------------------------------------------------------------
+# Timestamps
+
+array set exptime {
+ cm0n0g04 946730096
+ cm7n0g04 0
+ cm9n0g04 946684799
+}
+
+foreach f [TestFilesGlob testimages/cm*.png] {
+ set root [file rootname [file tail $f]]
+
+ #puts [clock format $exptime($root) -gmt 1]
+
+ test png-gettimestamp-$root {retrieve timestamp} {
+ ::png::getTimestamp $f
+ } $exptime($root) ; # {}
+}
+
+# -------------------------------------------------------------------------
+# Comments
+
+array set comex {
+ ct1n0g04 {{Title PngSuite} {Author {Willem A.J. van Schaik
+(willem@schaik.com)}} {Copyright {Copyright Willem van Schaik, Singapore 1995-96}} {Description {A compilation of a set of images created to test the
+various color-types of the PNG format. Included are
+black&white, color, paletted, with alpha channel, with
+transparency formats. All bit-depths allowed according
+to the spec are present.}} {Software {Created on a NeXTstation color using "pnmtopng".}} {Disclaimer Freeware.}}
+ ctzn0g04 {{Title PngSuite} {Author {Willem A.J. van Schaik
+(willem@schaik.com)}}}
+}
+
+# - Retrieval
+
+foreach f [TestFilesGlob testimages/*.png] {
+ set root [file rootname [file tail $f]]
+
+ # All files have a valid signature, except for two. These we ignore.
+ if {[string equal $root xcrn0g04]} continue
+ if {[string equal $root xlfn0g04]} continue
+ # All files are fully valid, except for all beginning with an
+ # 'x'. We ignore them as well.
+ if {[string match x* $root]} continue
+
+ test png-getcomment-$root {get comments} {
+ ::png::getComments $f
+ } [expr {
+ ![info exists comex($root)] ? "" : $comex($root)
+ }] ; # {}
+}
+
+# - Removal
+
+# Note: For a bad removeComments tests fail only on platforms where
+# the system encoding is not ASCII like, or the EOL is not a plain
+# LF. Windows for example, or asian systems.
+
+foreach root [array names comex] {
+ set f [localPath testimages/${root}.png]
+
+ test png-removecomment-$root {remove comments} {
+ set copy [makeFile {} pngrc.$root]
+ file copy -force $f $copy
+
+ ::png::removeComments $copy
+ set res [list [::png::validate $copy] [::png::getComments $copy]]
+ removeFile pngrc.$root
+ set res
+ } {OK {}}
+}
+
+# -------------------------------------------------------------------------
+testsuiteCleanup
diff --git a/tcllib/modules/png/testimages/basi0g01.png b/tcllib/modules/png/testimages/basi0g01.png
new file mode 100644
index 0000000..556fa72
--- /dev/null
+++ b/tcllib/modules/png/testimages/basi0g01.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/basi0g02.png b/tcllib/modules/png/testimages/basi0g02.png
new file mode 100644
index 0000000..ce09821
--- /dev/null
+++ b/tcllib/modules/png/testimages/basi0g02.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/basi0g04.png b/tcllib/modules/png/testimages/basi0g04.png
new file mode 100644
index 0000000..3853273
--- /dev/null
+++ b/tcllib/modules/png/testimages/basi0g04.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/basi0g08.png b/tcllib/modules/png/testimages/basi0g08.png
new file mode 100644
index 0000000..faed8be
--- /dev/null
+++ b/tcllib/modules/png/testimages/basi0g08.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/basi0g16.png b/tcllib/modules/png/testimages/basi0g16.png
new file mode 100644
index 0000000..a9f2816
--- /dev/null
+++ b/tcllib/modules/png/testimages/basi0g16.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/basi2c08.png b/tcllib/modules/png/testimages/basi2c08.png
new file mode 100644
index 0000000..2aab44d
--- /dev/null
+++ b/tcllib/modules/png/testimages/basi2c08.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/basi2c16.png b/tcllib/modules/png/testimages/basi2c16.png
new file mode 100644
index 0000000..cd7e50f
--- /dev/null
+++ b/tcllib/modules/png/testimages/basi2c16.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/basi3p01.png b/tcllib/modules/png/testimages/basi3p01.png
new file mode 100644
index 0000000..00a7cea
--- /dev/null
+++ b/tcllib/modules/png/testimages/basi3p01.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/basi3p02.png b/tcllib/modules/png/testimages/basi3p02.png
new file mode 100644
index 0000000..bb16b44
--- /dev/null
+++ b/tcllib/modules/png/testimages/basi3p02.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/basi3p04.png b/tcllib/modules/png/testimages/basi3p04.png
new file mode 100644
index 0000000..b4e888e
--- /dev/null
+++ b/tcllib/modules/png/testimages/basi3p04.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/basi3p08.png b/tcllib/modules/png/testimages/basi3p08.png
new file mode 100644
index 0000000..50a6d1c
--- /dev/null
+++ b/tcllib/modules/png/testimages/basi3p08.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/basi4a08.png b/tcllib/modules/png/testimages/basi4a08.png
new file mode 100644
index 0000000..398132b
--- /dev/null
+++ b/tcllib/modules/png/testimages/basi4a08.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/basi4a16.png b/tcllib/modules/png/testimages/basi4a16.png
new file mode 100644
index 0000000..51192e7
--- /dev/null
+++ b/tcllib/modules/png/testimages/basi4a16.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/basi6a08.png b/tcllib/modules/png/testimages/basi6a08.png
new file mode 100644
index 0000000..aecb32e
--- /dev/null
+++ b/tcllib/modules/png/testimages/basi6a08.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/basi6a16.png b/tcllib/modules/png/testimages/basi6a16.png
new file mode 100644
index 0000000..4181533
--- /dev/null
+++ b/tcllib/modules/png/testimages/basi6a16.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/basn0g01.png b/tcllib/modules/png/testimages/basn0g01.png
new file mode 100644
index 0000000..1d72242
--- /dev/null
+++ b/tcllib/modules/png/testimages/basn0g01.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/basn0g02.png b/tcllib/modules/png/testimages/basn0g02.png
new file mode 100644
index 0000000..5083324
--- /dev/null
+++ b/tcllib/modules/png/testimages/basn0g02.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/basn0g04.png b/tcllib/modules/png/testimages/basn0g04.png
new file mode 100644
index 0000000..0bf3687
--- /dev/null
+++ b/tcllib/modules/png/testimages/basn0g04.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/basn0g08.png b/tcllib/modules/png/testimages/basn0g08.png
new file mode 100644
index 0000000..23c8237
--- /dev/null
+++ b/tcllib/modules/png/testimages/basn0g08.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/basn0g16.png b/tcllib/modules/png/testimages/basn0g16.png
new file mode 100644
index 0000000..e7c82f7
--- /dev/null
+++ b/tcllib/modules/png/testimages/basn0g16.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/basn2c08.png b/tcllib/modules/png/testimages/basn2c08.png
new file mode 100644
index 0000000..db5ad15
--- /dev/null
+++ b/tcllib/modules/png/testimages/basn2c08.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/basn2c16.png b/tcllib/modules/png/testimages/basn2c16.png
new file mode 100644
index 0000000..50c1cb9
--- /dev/null
+++ b/tcllib/modules/png/testimages/basn2c16.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/basn3p01.png b/tcllib/modules/png/testimages/basn3p01.png
new file mode 100644
index 0000000..b145c2b
--- /dev/null
+++ b/tcllib/modules/png/testimages/basn3p01.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/basn3p02.png b/tcllib/modules/png/testimages/basn3p02.png
new file mode 100644
index 0000000..8985b3d
--- /dev/null
+++ b/tcllib/modules/png/testimages/basn3p02.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/basn3p04.png b/tcllib/modules/png/testimages/basn3p04.png
new file mode 100644
index 0000000..0fbf9e8
--- /dev/null
+++ b/tcllib/modules/png/testimages/basn3p04.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/basn3p08.png b/tcllib/modules/png/testimages/basn3p08.png
new file mode 100644
index 0000000..0ddad07
--- /dev/null
+++ b/tcllib/modules/png/testimages/basn3p08.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/basn4a08.png b/tcllib/modules/png/testimages/basn4a08.png
new file mode 100644
index 0000000..3e13052
--- /dev/null
+++ b/tcllib/modules/png/testimages/basn4a08.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/basn4a16.png b/tcllib/modules/png/testimages/basn4a16.png
new file mode 100644
index 0000000..8243644
--- /dev/null
+++ b/tcllib/modules/png/testimages/basn4a16.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/basn6a08.png b/tcllib/modules/png/testimages/basn6a08.png
new file mode 100644
index 0000000..e608738
--- /dev/null
+++ b/tcllib/modules/png/testimages/basn6a08.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/basn6a16.png b/tcllib/modules/png/testimages/basn6a16.png
new file mode 100644
index 0000000..984a995
--- /dev/null
+++ b/tcllib/modules/png/testimages/basn6a16.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/bgai4a08.png b/tcllib/modules/png/testimages/bgai4a08.png
new file mode 100644
index 0000000..398132b
--- /dev/null
+++ b/tcllib/modules/png/testimages/bgai4a08.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/bgai4a16.png b/tcllib/modules/png/testimages/bgai4a16.png
new file mode 100644
index 0000000..51192e7
--- /dev/null
+++ b/tcllib/modules/png/testimages/bgai4a16.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/bgan6a08.png b/tcllib/modules/png/testimages/bgan6a08.png
new file mode 100644
index 0000000..e608738
--- /dev/null
+++ b/tcllib/modules/png/testimages/bgan6a08.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/bgan6a16.png b/tcllib/modules/png/testimages/bgan6a16.png
new file mode 100644
index 0000000..984a995
--- /dev/null
+++ b/tcllib/modules/png/testimages/bgan6a16.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/bgbn4a08.png b/tcllib/modules/png/testimages/bgbn4a08.png
new file mode 100644
index 0000000..7cbefc3
--- /dev/null
+++ b/tcllib/modules/png/testimages/bgbn4a08.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/bggn4a16.png b/tcllib/modules/png/testimages/bggn4a16.png
new file mode 100644
index 0000000..13fd85b
--- /dev/null
+++ b/tcllib/modules/png/testimages/bggn4a16.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/bgwn6a08.png b/tcllib/modules/png/testimages/bgwn6a08.png
new file mode 100644
index 0000000..a67ff20
--- /dev/null
+++ b/tcllib/modules/png/testimages/bgwn6a08.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/bgyn6a16.png b/tcllib/modules/png/testimages/bgyn6a16.png
new file mode 100644
index 0000000..ae3e9be
--- /dev/null
+++ b/tcllib/modules/png/testimages/bgyn6a16.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/ccwn2c08.png b/tcllib/modules/png/testimages/ccwn2c08.png
new file mode 100644
index 0000000..47c2481
--- /dev/null
+++ b/tcllib/modules/png/testimages/ccwn2c08.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/ccwn3p08.png b/tcllib/modules/png/testimages/ccwn3p08.png
new file mode 100644
index 0000000..8bb2c10
--- /dev/null
+++ b/tcllib/modules/png/testimages/ccwn3p08.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/cdfn2c08.png b/tcllib/modules/png/testimages/cdfn2c08.png
new file mode 100644
index 0000000..559e526
--- /dev/null
+++ b/tcllib/modules/png/testimages/cdfn2c08.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/cdhn2c08.png b/tcllib/modules/png/testimages/cdhn2c08.png
new file mode 100644
index 0000000..3e07e8e
--- /dev/null
+++ b/tcllib/modules/png/testimages/cdhn2c08.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/cdsn2c08.png b/tcllib/modules/png/testimages/cdsn2c08.png
new file mode 100644
index 0000000..076c32c
--- /dev/null
+++ b/tcllib/modules/png/testimages/cdsn2c08.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/cdun2c08.png b/tcllib/modules/png/testimages/cdun2c08.png
new file mode 100644
index 0000000..846033b
--- /dev/null
+++ b/tcllib/modules/png/testimages/cdun2c08.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/ch1n3p04.png b/tcllib/modules/png/testimages/ch1n3p04.png
new file mode 100644
index 0000000..17cd12d
--- /dev/null
+++ b/tcllib/modules/png/testimages/ch1n3p04.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/ch2n3p08.png b/tcllib/modules/png/testimages/ch2n3p08.png
new file mode 100644
index 0000000..25c1798
--- /dev/null
+++ b/tcllib/modules/png/testimages/ch2n3p08.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/cm0n0g04.png b/tcllib/modules/png/testimages/cm0n0g04.png
new file mode 100644
index 0000000..9fba5db
--- /dev/null
+++ b/tcllib/modules/png/testimages/cm0n0g04.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/cm7n0g04.png b/tcllib/modules/png/testimages/cm7n0g04.png
new file mode 100644
index 0000000..f7dc46e
--- /dev/null
+++ b/tcllib/modules/png/testimages/cm7n0g04.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/cm9n0g04.png b/tcllib/modules/png/testimages/cm9n0g04.png
new file mode 100644
index 0000000..dd70911
--- /dev/null
+++ b/tcllib/modules/png/testimages/cm9n0g04.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/cs3n2c16.png b/tcllib/modules/png/testimages/cs3n2c16.png
new file mode 100644
index 0000000..bf5fd20
--- /dev/null
+++ b/tcllib/modules/png/testimages/cs3n2c16.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/cs3n3p08.png b/tcllib/modules/png/testimages/cs3n3p08.png
new file mode 100644
index 0000000..f4a6623
--- /dev/null
+++ b/tcllib/modules/png/testimages/cs3n3p08.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/cs5n2c08.png b/tcllib/modules/png/testimages/cs5n2c08.png
new file mode 100644
index 0000000..40f947c
--- /dev/null
+++ b/tcllib/modules/png/testimages/cs5n2c08.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/cs5n3p08.png b/tcllib/modules/png/testimages/cs5n3p08.png
new file mode 100644
index 0000000..dfd6e6e
--- /dev/null
+++ b/tcllib/modules/png/testimages/cs5n3p08.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/cs8n2c08.png b/tcllib/modules/png/testimages/cs8n2c08.png
new file mode 100644
index 0000000..8e01d32
--- /dev/null
+++ b/tcllib/modules/png/testimages/cs8n2c08.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/cs8n3p08.png b/tcllib/modules/png/testimages/cs8n3p08.png
new file mode 100644
index 0000000..a44066e
--- /dev/null
+++ b/tcllib/modules/png/testimages/cs8n3p08.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/ct0n0g04.png b/tcllib/modules/png/testimages/ct0n0g04.png
new file mode 100644
index 0000000..40d1e06
--- /dev/null
+++ b/tcllib/modules/png/testimages/ct0n0g04.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/ct1n0g04.png b/tcllib/modules/png/testimages/ct1n0g04.png
new file mode 100644
index 0000000..3ba110a
--- /dev/null
+++ b/tcllib/modules/png/testimages/ct1n0g04.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/ctzn0g04.png b/tcllib/modules/png/testimages/ctzn0g04.png
new file mode 100644
index 0000000..b4401c9
--- /dev/null
+++ b/tcllib/modules/png/testimages/ctzn0g04.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/f00n0g08.png b/tcllib/modules/png/testimages/f00n0g08.png
new file mode 100644
index 0000000..45a0075
--- /dev/null
+++ b/tcllib/modules/png/testimages/f00n0g08.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/f00n2c08.png b/tcllib/modules/png/testimages/f00n2c08.png
new file mode 100644
index 0000000..d6a1fff
--- /dev/null
+++ b/tcllib/modules/png/testimages/f00n2c08.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/f01n0g08.png b/tcllib/modules/png/testimages/f01n0g08.png
new file mode 100644
index 0000000..4a1107b
--- /dev/null
+++ b/tcllib/modules/png/testimages/f01n0g08.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/f01n2c08.png b/tcllib/modules/png/testimages/f01n2c08.png
new file mode 100644
index 0000000..26fee95
--- /dev/null
+++ b/tcllib/modules/png/testimages/f01n2c08.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/f02n0g08.png b/tcllib/modules/png/testimages/f02n0g08.png
new file mode 100644
index 0000000..bfe410c
--- /dev/null
+++ b/tcllib/modules/png/testimages/f02n0g08.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/f02n2c08.png b/tcllib/modules/png/testimages/f02n2c08.png
new file mode 100644
index 0000000..e590f12
--- /dev/null
+++ b/tcllib/modules/png/testimages/f02n2c08.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/f03n0g08.png b/tcllib/modules/png/testimages/f03n0g08.png
new file mode 100644
index 0000000..ed01e29
--- /dev/null
+++ b/tcllib/modules/png/testimages/f03n0g08.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/f03n2c08.png b/tcllib/modules/png/testimages/f03n2c08.png
new file mode 100644
index 0000000..7581150
--- /dev/null
+++ b/tcllib/modules/png/testimages/f03n2c08.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/f04n0g08.png b/tcllib/modules/png/testimages/f04n0g08.png
new file mode 100644
index 0000000..663fdae
--- /dev/null
+++ b/tcllib/modules/png/testimages/f04n0g08.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/f04n2c08.png b/tcllib/modules/png/testimages/f04n2c08.png
new file mode 100644
index 0000000..3c8b511
--- /dev/null
+++ b/tcllib/modules/png/testimages/f04n2c08.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/g03n0g16.png b/tcllib/modules/png/testimages/g03n0g16.png
new file mode 100644
index 0000000..41083ca
--- /dev/null
+++ b/tcllib/modules/png/testimages/g03n0g16.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/g03n2c08.png b/tcllib/modules/png/testimages/g03n2c08.png
new file mode 100644
index 0000000..a9354db
--- /dev/null
+++ b/tcllib/modules/png/testimages/g03n2c08.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/g03n3p04.png b/tcllib/modules/png/testimages/g03n3p04.png
new file mode 100644
index 0000000..60396c9
--- /dev/null
+++ b/tcllib/modules/png/testimages/g03n3p04.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/g04n0g16.png b/tcllib/modules/png/testimages/g04n0g16.png
new file mode 100644
index 0000000..32395b7
--- /dev/null
+++ b/tcllib/modules/png/testimages/g04n0g16.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/g04n2c08.png b/tcllib/modules/png/testimages/g04n2c08.png
new file mode 100644
index 0000000..a652b0c
--- /dev/null
+++ b/tcllib/modules/png/testimages/g04n2c08.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/g04n3p04.png b/tcllib/modules/png/testimages/g04n3p04.png
new file mode 100644
index 0000000..5661cc3
--- /dev/null
+++ b/tcllib/modules/png/testimages/g04n3p04.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/g05n0g16.png b/tcllib/modules/png/testimages/g05n0g16.png
new file mode 100644
index 0000000..70b37f0
--- /dev/null
+++ b/tcllib/modules/png/testimages/g05n0g16.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/g05n2c08.png b/tcllib/modules/png/testimages/g05n2c08.png
new file mode 100644
index 0000000..932c136
--- /dev/null
+++ b/tcllib/modules/png/testimages/g05n2c08.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/g05n3p04.png b/tcllib/modules/png/testimages/g05n3p04.png
new file mode 100644
index 0000000..9619930
--- /dev/null
+++ b/tcllib/modules/png/testimages/g05n3p04.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/g07n0g16.png b/tcllib/modules/png/testimages/g07n0g16.png
new file mode 100644
index 0000000..d6a47c2
--- /dev/null
+++ b/tcllib/modules/png/testimages/g07n0g16.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/g07n2c08.png b/tcllib/modules/png/testimages/g07n2c08.png
new file mode 100644
index 0000000..5973464
--- /dev/null
+++ b/tcllib/modules/png/testimages/g07n2c08.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/g07n3p04.png b/tcllib/modules/png/testimages/g07n3p04.png
new file mode 100644
index 0000000..c73fb61
--- /dev/null
+++ b/tcllib/modules/png/testimages/g07n3p04.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/g10n0g16.png b/tcllib/modules/png/testimages/g10n0g16.png
new file mode 100644
index 0000000..85f2c95
--- /dev/null
+++ b/tcllib/modules/png/testimages/g10n0g16.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/g10n2c08.png b/tcllib/modules/png/testimages/g10n2c08.png
new file mode 100644
index 0000000..b303997
--- /dev/null
+++ b/tcllib/modules/png/testimages/g10n2c08.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/g10n3p04.png b/tcllib/modules/png/testimages/g10n3p04.png
new file mode 100644
index 0000000..1b6a6be
--- /dev/null
+++ b/tcllib/modules/png/testimages/g10n3p04.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/g25n0g16.png b/tcllib/modules/png/testimages/g25n0g16.png
new file mode 100644
index 0000000..a9f6787
--- /dev/null
+++ b/tcllib/modules/png/testimages/g25n0g16.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/g25n2c08.png b/tcllib/modules/png/testimages/g25n2c08.png
new file mode 100644
index 0000000..03f505a
--- /dev/null
+++ b/tcllib/modules/png/testimages/g25n2c08.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/g25n3p04.png b/tcllib/modules/png/testimages/g25n3p04.png
new file mode 100644
index 0000000..4f943c6
--- /dev/null
+++ b/tcllib/modules/png/testimages/g25n3p04.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/oi1n0g16.png b/tcllib/modules/png/testimages/oi1n0g16.png
new file mode 100644
index 0000000..e7c82f7
--- /dev/null
+++ b/tcllib/modules/png/testimages/oi1n0g16.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/oi1n2c16.png b/tcllib/modules/png/testimages/oi1n2c16.png
new file mode 100644
index 0000000..50c1cb9
--- /dev/null
+++ b/tcllib/modules/png/testimages/oi1n2c16.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/oi2n0g16.png b/tcllib/modules/png/testimages/oi2n0g16.png
new file mode 100644
index 0000000..14d64c5
--- /dev/null
+++ b/tcllib/modules/png/testimages/oi2n0g16.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/oi2n2c16.png b/tcllib/modules/png/testimages/oi2n2c16.png
new file mode 100644
index 0000000..4c2e3e3
--- /dev/null
+++ b/tcllib/modules/png/testimages/oi2n2c16.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/oi4n0g16.png b/tcllib/modules/png/testimages/oi4n0g16.png
new file mode 100644
index 0000000..69e73ed
--- /dev/null
+++ b/tcllib/modules/png/testimages/oi4n0g16.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/oi4n2c16.png b/tcllib/modules/png/testimages/oi4n2c16.png
new file mode 100644
index 0000000..93691e3
--- /dev/null
+++ b/tcllib/modules/png/testimages/oi4n2c16.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/oi9n0g16.png b/tcllib/modules/png/testimages/oi9n0g16.png
new file mode 100644
index 0000000..9248413
--- /dev/null
+++ b/tcllib/modules/png/testimages/oi9n0g16.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/oi9n2c16.png b/tcllib/modules/png/testimages/oi9n2c16.png
new file mode 100644
index 0000000..f0512e4
--- /dev/null
+++ b/tcllib/modules/png/testimages/oi9n2c16.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/pngsuite.doc b/tcllib/modules/png/testimages/pngsuite.doc
new file mode 100644
index 0000000..7da918b
--- /dev/null
+++ b/tcllib/modules/png/testimages/pngsuite.doc
@@ -0,0 +1,520 @@
+ PNGSUITE
+----------------
+
+ testset for PNG-(de)coders
+ created by Willem van Schaik
+------------------------------------
+
+This is a collection of graphics images created to test the png applications
+like viewers, converters and editors. All (as far as that is possible)
+formats supported by the PNG standard are represented.
+
+
+1. INTRODUCTION
+--------------------
+
+1.1 PNG capabilities
+------------------------
+
+Supported color-types are:
+
+ - grayscale
+ - grayscale + alpha-channel
+ - color palettes
+ - rgb
+ - rgb + alpha-channel
+
+Allowed bitdepths are depending on the color-type, but are in the range
+of 1-bit (grayscale, which is b&w) upto 16-bits.
+
+Special features are:
+
+ - interlacing (Adam-7)
+ - gamma-support
+ - transparency (a poor-man's alpha solution)
+
+
+1.2 File naming
+-------------------
+
+Where possible, the testfiles are 32x32 bits icons. This results in a still
+reasonable size of the suite even with a large number of tests. The name
+of each test-file reflects thetype in the following way:
+
+ g04i2c08.png
+ || |||+---- bit-depth
+ || ||+----- color-type (descriptive)
+ || |+------ color-type (numerical)
+ || +------- interlaced or non-interlaced
+ |+--------- parameter of test (in this case gamma-value)
+ +---------- test feature (in this case gamma)
+
+
+1.3 PNG formats
+-------------------
+
+color-type:
+ 0g - grayscale
+ 2c - rgb color
+ 3p - paletted
+ 4a - grayscale + alpha channel
+ 6a - rgb color + alpha channel
+
+bit-depth:
+ 01 - with color-type 0, 3
+ 02 - with color-type 0, 3
+ 04 - with color-type 0, 3
+ 08 - with color-type 0, 2, 3, 4, 6
+ 16 - with color-type 0, 2, 4, 6
+
+interlacing:
+ n - non-interlaced
+ i - interlaced
+
+
+2. THE TESTS
+-----------------
+
+2.1 Sizes
+-------------
+
+These tests are there to check if your software handles pictures well, with
+picture sizes that are not a multiple of 8. This is particularly important
+with Adam-7 type interlacing. In the same way these tests check if pictures
+size 1x1 and similar are ok.
+
+ s01 - 1x1 pixel picture
+ s02 - 2x2 pixel picture
+ s03 - 3x3 pixel picture
+ s04 - 4x4 pixel picture
+ s05 - 5x5 pixel picture
+ s06 - 6x6 pixel picture
+ s07 - 7x7 pixel picture
+ s08 - 8x8 pixel picture
+ s09 - 9x9 pixel picture
+ s32 - 32x32 pixel picture
+ s33 - 33x33 pixel picture
+ s34 - 34x34 pixel picture
+ s35 - 35x35 pixel picture
+ s36 - 36x36 pixel picture
+ s37 - 37x37 pixel picture
+ s38 - 38x38 pixel picture
+ s39 - 39x39 pixel picture
+ s40 - 40x40 pixel picture
+
+
+2.2 Background
+------------------
+
+When the PNG file contains a background chunck, this should be used for
+pictures with alpha-channel or pictures with a transparency chunck. For
+pictures without this background-chunk, but with alpha, this testset
+assumes a black background.
+
+For the images in this test, the left-side should be 100% the background
+color, where moving to the right the color should gradually become the
+image pattern.
+
+ bga - alpha + no background
+ bgw - alpha + white background
+ bgg - alpha + gray background
+ bgb - alpha + black background
+ bgy - alpha + yellow background
+
+
+2.3 Transparency
+--------------------
+
+Transparency should be used together with a background chunk. To test the
+combination of the two the latter 4 tests are there. How to handle pictures
+with transparancy, but without a background, opinions can differ. Here we
+use black, but especially in the case of paletted images, the normal color
+would maybe even be better.
+
+ tp0 - not transparent for reference
+ tp1 - transparent, but no background chunk
+ tbw - transparent + white background
+ tbg - transparent + gray background
+ tbb - transparent + black background
+ tby - transparent + yellow background
+
+
+2.4 Gamma
+-------------
+
+To test if your viewer handles gamma-correction, 6 testfiles are available.
+They contain corrected color-ramps and a corresponding gamma-chunk with the
+file-gamma value. These are created in such a way that when the viewer does
+the gamma correction right, all 6 should be displayed identical.
+
+If they are different, probably the gamma correction is omitted. In that
+case, have a look at the two right coloumns in the 6 pictures. The image
+where those two look the same (when looked from far) reflects the gamma of
+your system. However, because of the limited size of the image, you should
+do more elaborate tests to determine your display gamma.
+
+ g03 - file-gamma = 0.35, for display with gamma = 2.8
+ g04 - file-gamma = 0.45, for display with gamma = 2.2 (PC)
+ g05 - file-gamma = 0.55, for display with gamma = 1.8 (Mac)
+ g07 - file-gamma = 0.70, for display with gamma = 1.4
+ g10 - file-gamma = 1.00, for display with gamma = 1.0 (NeXT)
+ g25 - file-gamma = 2.50, for display with gamma = 0.4
+
+
+2.5 Filtering
+-----------------
+
+PNG uses file-filtering, for optimal compression. Normally the type is of
+filtering is adjusted to the contents of the picture, but here each file
+has the same picture, with a different filtering.
+
+ f0 - no filtering
+ f1 - sub filtering
+ f2 - up filtering
+ f3 - average filtering
+ f4 - paeth filtering
+
+
+2.6 Additional palettes
+---------------------------
+
+Besides the normal use of paletted images, palette chunks can in combination
+with true-color (and other) images also be used to select color lookup-tables
+when the video system is of limited capabilities. The suggested palette chunk
+is specially created for this purpose.
+
+ pp - normal palette chunk
+ ps - suggested palette chunk
+
+
+2.7 Ancillary chunks (under construction)
+------------------------
+
+To test the correct decoding of ancillary chunks, these test-files contain
+one or more examples of these chunkcs. Depending on the type of chunk, a
+number of typical values are selected to test. Unluckily, the testset can
+not contain all combinations, because that would be an endless set.
+
+The significant bits are used in files with the next higher bit-depth. They
+indicate howmany bits are valid.
+
+ cs3 - 3 significant bits
+ cs5 - 5 significant bits
+ cs8 - 8 significant bits (reference)
+ cs3 - 13 significant bits
+
+For the physical pixel dimensions, the result of each decoding should be
+a sqare picture. The first (cdf) image is an example of flat (horizontal)
+pixels, where the pHYS chunk (x is 1 per unit, y = 4 per unit) must take
+care of the correction. The second is just the other way round. The last
+example uses the unit specifier, for 1000 pixels per meter. This should
+result in a picture of 3.2 cm square.
+
+ cdf - physical pixel dimensions, 8x32 flat pixels
+ cdh - physical pixel dimensions, 32x8 high pixels
+ cds - physical pixel dimensions, 8x8 square pixels
+ cdu - physical pixel dimensions, with unit-specifier
+
+ ccw - primary chromaticities and white point
+
+ ch1 - histogram 15 colors
+ ch2 - histogram 256 colors
+
+ cm7 - modification time, 01-jan-1970
+ cm9 - modification time, 31-dec-1999
+ cm0 - modification time, 01-jan-2000
+
+In the textual chunk, a number of the standard, and some non-standard
+text items are included.
+
+ ct0 - no textual data
+ ct1 - with textual data
+ ctz - with compressed textual data
+
+
+2.8 Chunk ordering (still under construction)
+----------------------
+
+These testfiles will test the obligatory ordering relations between various
+chunk types (not yet) as well as the number of data chunks used for the image.
+
+ oi1 - mother image with 1 idat-chunk
+ oi2 - image with 2 idat-chunks
+ oi4 - image with 4 unequal sized idat-chunks
+ oi9 - all idat-chunks of length one
+
+
+2.9 Compression level
+-------------------------
+
+Here you will find a set of images compressed by zlib, ranging from level 0
+for no compression at maximum speed upto level 9 for maximum compression.
+
+ z00 - zlib compression level 0 - none
+ z03 - zlib compression level 3
+ z06 - zlib compression level 6 - default
+ z09 - zlib compression level 9 - maximum
+
+
+2.10 Corrupted files (under construction)
+-----------------------
+
+All these files are illegal. When decoding they should generate appropriate
+error-messages.
+
+ x00 - empty IDAT chunk
+ xcr - added cr bytes
+ xlf - added lf bytes
+ xc0 - color type 0
+ xc9 - color type 9
+ xd0 - bit-depth 0
+ xd3 - bit-depth 3
+ xd9 - bit-depth 99
+ xcs - incorrect IDAT checksum
+
+
+3. TEST FILES
+------------------
+
+For each of the tests listed above, one or more test-files are created. A
+selection is made (for each test) for the color-type and bitdepth to be used
+for the tests. Further for a number of tests, both a non-interlaced as well
+as an interlaced version is available.
+
+
+3.1 Basic format test files (non-interlaced)
+------------------------------------------------
+
+ basn0g01 - black & white
+ basn0g02 - 2 bit (4 level) grayscale
+ basn0g04 - 4 bit (16 level) grayscale
+ basn0g08 - 8 bit (256 level) grayscale
+ basn0g16 - 16 bit (64k level) grayscale
+ basn2c08 - 3x8 bits rgb color
+ basn2c16 - 3x16 bits rgb color
+ basn3p01 - 1 bit (2 color) paletted
+ basn3p02 - 2 bit (4 color) paletted
+ basn3p04 - 4 bit (16 color) paletted
+ basn3p08 - 8 bit (256 color) paletted
+ basn4a08 - 8 bit grayscale + 8 bit alpha-channel
+ basn4a16 - 16 bit grayscale + 16 bit alpha-channel
+ basn6a08 - 3x8 bits rgb color + 8 bit alpha-channel
+ basn6a16 - 3x16 bits rgb color + 16 bit alpha-channel
+
+
+3.2 Basic format test files (Adam-7 interlaced)
+---------------------------------------------------
+
+ basi0g01 - black & white
+ basi0g02 - 2 bit (4 level) grayscale
+ basi0g04 - 4 bit (16 level) grayscale
+ basi0g08 - 8 bit (256 level) grayscale
+ basi0g16 - 16 bit (64k level) grayscale
+ basi2c08 - 3x8 bits rgb color
+ basi2c16 - 3x16 bits rgb color
+ basi3p01 - 1 bit (2 color) paletted
+ basi3p02 - 2 bit (4 color) paletted
+ basi3p04 - 4 bit (16 color) paletted
+ basi3p08 - 8 bit (256 color) paletted
+ basi4a08 - 8 bit grayscale + 8 bit alpha-channel
+ basi4a16 - 16 bit grayscale + 16 bit alpha-channel
+ basi6a08 - 3x8 bits rgb color + 8 bit alpha-channel
+ basi6a16 - 3x16 bits rgb color + 16 bit alpha-channel
+
+
+3.3 Sizes test files
+-----------------------
+
+ s01n3p01 - 1x1 paletted file, no interlacing
+ s02n3p01 - 2x2 paletted file, no interlacing
+ s03n3p01 - 3x3 paletted file, no interlacing
+ s04n3p01 - 4x4 paletted file, no interlacing
+ s05n3p02 - 5x5 paletted file, no interlacing
+ s06n3p02 - 6x6 paletted file, no interlacing
+ s07n3p02 - 7x7 paletted file, no interlacing
+ s08n3p02 - 8x8 paletted file, no interlacing
+ s09n3p02 - 9x9 paletted file, no interlacing
+ s32n3p04 - 32x32 paletted file, no interlacing
+ s33n3p04 - 33x33 paletted file, no interlacing
+ s34n3p04 - 34x34 paletted file, no interlacing
+ s35n3p04 - 35x35 paletted file, no interlacing
+ s36n3p04 - 36x36 paletted file, no interlacing
+ s37n3p04 - 37x37 paletted file, no interlacing
+ s38n3p04 - 38x38 paletted file, no interlacing
+ s39n3p04 - 39x39 paletted file, no interlacing
+ s40n3p04 - 40x40 paletted file, no interlacing
+
+ s01i3p01 - 1x1 paletted file, interlaced
+ s02i3p01 - 2x2 paletted file, interlaced
+ s03i3p01 - 3x3 paletted file, interlaced
+ s04i3p01 - 4x4 paletted file, interlaced
+ s05i3p02 - 5x5 paletted file, interlaced
+ s06i3p02 - 6x6 paletted file, interlaced
+ s07i3p02 - 7x7 paletted file, interlaced
+ s08i3p02 - 8x8 paletted file, interlaced
+ s09i3p02 - 9x9 paletted file, interlaced
+ s32i3p04 - 32x32 paletted file, interlaced
+ s33i3p04 - 33x33 paletted file, interlaced
+ s34i3p04 - 34x34 paletted file, interlaced
+ s35i3p04 - 35x35 paletted file, interlaced
+ s36i3p04 - 36x36 paletted file, interlaced
+ s37i3p04 - 37x37 paletted file, interlaced
+ s38i3p04 - 38x38 paletted file, interlaced
+ s39i3p04 - 39x39 paletted file, interlaced
+ s40i3p04 - 40x40 paletted file, interlaced
+
+
+3.4 Background test files (with alpha)
+------------------------------------------
+
+ bgai4a08 - 8 bit grayscale, alpha, no background chunk, interlaced
+ bgai4a16 - 16 bit grayscale, alpha, no background chunk, interlaced
+ bgan6a08 - 3x8 bits rgb color, alpha, no background chunk
+ bgan6a16 - 3x16 bits rgb color, alpha, no background chunk
+
+ bgbn4a08 - 8 bit grayscale, alpha, black background chunk
+ bggn4a16 - 16 bit grayscale, alpha, gray background chunk
+ bgwn6a08 - 3x8 bits rgb color, alpha, white background chunk
+ bgyn6a16 - 3x16 bits rgb color, alpha, yellow background chunk
+
+
+3.5 Transparency (and background) test files
+------------------------------------------------
+
+ tp0n1g08 - not transparent for reference (logo on gray)
+ tbbn1g04 - transparent, black background chunk
+ tbwn1g16 - transparent, white background chunk
+ tp0n2c08 - not transparent for reference (logo on gray)
+ tbrn2c08 - transparent, red background chunk
+ tbgn2c16 - transparent, green background chunk
+ tbbn2c16 - transparent, blue background chunk
+ tp0n3p08 - not transparent for reference (logo on gray)
+ tp1n3p08 - transparent, but no background chunk
+ tbbn3p08 - transparent, black background chunk
+ tbgn3p08 - transparent, light-gray background chunk
+ tbwn3p08 - transparent, white background chunk
+ tbyn3p08 - transparent, yellow background chunk
+
+
+3.6 Gamma test files
+------------------------
+
+ g03n0g16 - grayscale, file-gamma = 0.35
+ g04n0g16 - grayscale, file-gamma = 0.45
+ g05n0g16 - grayscale, file-gamma = 0.55
+ g07n0g16 - grayscale, file-gamma = 0.70
+ g10n0g16 - grayscale, file-gamma = 1.00
+ g25n0g16 - grayscale, file-gamma = 2.50
+ g03n2c08 - color, file-gamma = 0.35
+ g04n2c08 - color, file-gamma = 0.45
+ g05n2c08 - color, file-gamma = 0.55
+ g07n2c08 - color, file-gamma = 0.70
+ g10n2c08 - color, file-gamma = 1.00
+ g25n2c08 - color, file-gamma = 2.50
+ g03n3p04 - paletted, file-gamma = 0.35
+ g04n3p04 - paletted, file-gamma = 0.45
+ g05n3p04 - paletted, file-gamma = 0.55
+ g07n3p04 - paletted, file-gamma = 0.70
+ g10n3p04 - paletted, file-gamma = 1.00
+ g25n3p04 - paletted, file-gamma = 2.50
+
+
+3.7 Filtering test files
+----------------------------
+
+ f00n0g08 - grayscale, no interlacing, filter-type 0
+ f01n0g08 - grayscale, no interlacing, filter-type 1
+ f02n0g08 - grayscale, no interlacing, filter-type 2
+ f03n0g08 - grayscale, no interlacing, filter-type 3
+ f04n0g08 - grayscale, no interlacing, filter-type 4
+ f00n2c08 - color, no interlacing, filter-type 0
+ f01n2c08 - color, no interlacing, filter-type 1
+ f02n2c08 - color, no interlacing, filter-type 2
+ f03n2c08 - color, no interlacing, filter-type 3
+ f04n2c08 - color, no interlacing, filter-type 4
+
+
+3.8 Additional palette chunk test files
+-------------------------------------------
+
+ pp0n2c16 - six-cube palette-chunk in true-color image
+ pp0n6a08 - six-cube palette-chunk in true-color+alpha image
+ ps1n0g08 - six-cube suggested palette (1 byte) in grayscale image
+ ps1n2c16 - six-cube suggested palette (1 byte) in true-color image
+ ps2n0g08 - six-cube suggested palette (2 bytes) in grayscale image
+ ps2n2c16 - six-cube suggested palette (2 bytes) in true-color image
+
+
+3.9 Ancillary chunks test files
+-----------------------------------
+
+ cs5n2c08 - color, 5 significant bits
+ cs8n2c08 - color, 8 significant bits (reference)
+ cs3n2c16 - color, 13 significant bits
+ cs3n3p08 - paletted, 3 significant bits
+ cs5n3p08 - paletted, 5 significant bits
+ cs8n3p08 - paletted, 8 significant bits (reference)
+
+ cdfn2c08 - physical pixel dimensions, 8x32 flat pixels
+ cdhn2c08 - physical pixel dimensions, 32x8 high pixels
+ cdsn2c08 - physical pixel dimensions, 8x8 square pixels
+ cdun2c08 - physical pixel dimensions, 1000 pixels per 1 meter
+
+ ccwn2c08 - chroma chunk w:0.3127,0.3290 r:0.64,0.33 g:0.30,0.60 b:0.15,0.06
+ ccwn3p08 - chroma chunk w:0.3127,0.3290 r:0.64,0.33 g:0.30,0.60 b:0.15,0.06
+
+ ch1n3p04 - histogram 15 colors
+ ch2n3p08 - histogram 256 colors
+
+ cm7n0g04 - modification time, 01-jan-1970 00:00:00
+ cm9n0g04 - modification time, 31-dec-1999 23:59:59
+ cm0n0g04 - modification time, 01-jan-2000 12:34:56
+
+ ct0n0g04 - no textual data
+ ct1n0g04 - with textual data
+ ctzn0g04 - with compressed textual data
+
+
+
+3.10 Chunk ordering
+----------------------
+
+ oi1n0g16 - grayscale mother image with 1 idat-chunk
+ oi2n0g16 - grayscale image with 2 idat-chunks
+ oi4n0g16 - grayscale image with 4 unequal sized idat-chunks
+ oi9n0g16 - grayscale image with all idat-chunks length one
+ oi1n2c16 - color mother image with 1 idat-chunk
+ oi2n2c16 - color image with 2 idat-chunks
+ oi4n2c16 - color image with 4 unequal sized idat-chunks
+ oi9n2c16 - color image with all idat-chunks length one
+
+
+
+3.11 Compression level
+-------------------------
+
+ z00n2c08 - color, no interlacing, compression level 0 (none)
+ z03n2c08 - color, no interlacing, compression level 3
+ z06n2c08 - color, no interlacing, compression level 6 (default)
+ z09n2c08 - color, no interlacing, compression level 9 (maximum)
+
+
+
+3.12 Currupted files
+-----------------------
+
+ x00n0g01 - empty 0x0 grayscale file
+ xcrn0g04 - added cr bytes
+ xlfn0g04 - added lf bytes
+ xc0n0c08 - color type 0
+ xc9n0c08 - color type 9
+ xd0n2c00 - bit-depth 0
+ xd3n2c03 - bit-depth 3
+ xd9n2c99 - bit-depth 99
+ xcsn2c08 - incorrect IDAT checksum
+
+
+--------
+ (c) Willem van Schaik
+ willem@schaik.com
+ Singapore, October 1996
diff --git a/tcllib/modules/png/testimages/pngsuite_logo.png b/tcllib/modules/png/testimages/pngsuite_logo.png
new file mode 100644
index 0000000..205460d
--- /dev/null
+++ b/tcllib/modules/png/testimages/pngsuite_logo.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/pp0n2c16.png b/tcllib/modules/png/testimages/pp0n2c16.png
new file mode 100644
index 0000000..8f2aad7
--- /dev/null
+++ b/tcllib/modules/png/testimages/pp0n2c16.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/pp0n6a08.png b/tcllib/modules/png/testimages/pp0n6a08.png
new file mode 100644
index 0000000..4ed7a30
--- /dev/null
+++ b/tcllib/modules/png/testimages/pp0n6a08.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/ps1n0g08.png b/tcllib/modules/png/testimages/ps1n0g08.png
new file mode 100644
index 0000000..2053df2
--- /dev/null
+++ b/tcllib/modules/png/testimages/ps1n0g08.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/ps1n2c16.png b/tcllib/modules/png/testimages/ps1n2c16.png
new file mode 100644
index 0000000..b03ecfc
--- /dev/null
+++ b/tcllib/modules/png/testimages/ps1n2c16.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/ps2n0g08.png b/tcllib/modules/png/testimages/ps2n0g08.png
new file mode 100644
index 0000000..beeab8f
--- /dev/null
+++ b/tcllib/modules/png/testimages/ps2n0g08.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/ps2n2c16.png b/tcllib/modules/png/testimages/ps2n2c16.png
new file mode 100644
index 0000000..c256f90
--- /dev/null
+++ b/tcllib/modules/png/testimages/ps2n2c16.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/s01i3p01.png b/tcllib/modules/png/testimages/s01i3p01.png
new file mode 100644
index 0000000..6c0fad1
--- /dev/null
+++ b/tcllib/modules/png/testimages/s01i3p01.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/s01n3p01.png b/tcllib/modules/png/testimages/s01n3p01.png
new file mode 100644
index 0000000..cb2c8c7
--- /dev/null
+++ b/tcllib/modules/png/testimages/s01n3p01.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/s02i3p01.png b/tcllib/modules/png/testimages/s02i3p01.png
new file mode 100644
index 0000000..2defaed
--- /dev/null
+++ b/tcllib/modules/png/testimages/s02i3p01.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/s02n3p01.png b/tcllib/modules/png/testimages/s02n3p01.png
new file mode 100644
index 0000000..2b1b669
--- /dev/null
+++ b/tcllib/modules/png/testimages/s02n3p01.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/s03i3p01.png b/tcllib/modules/png/testimages/s03i3p01.png
new file mode 100644
index 0000000..c23fdc4
--- /dev/null
+++ b/tcllib/modules/png/testimages/s03i3p01.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/s03n3p01.png b/tcllib/modules/png/testimages/s03n3p01.png
new file mode 100644
index 0000000..6d96ee4
--- /dev/null
+++ b/tcllib/modules/png/testimages/s03n3p01.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/s04i3p01.png b/tcllib/modules/png/testimages/s04i3p01.png
new file mode 100644
index 0000000..0e710c2
--- /dev/null
+++ b/tcllib/modules/png/testimages/s04i3p01.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/s04n3p01.png b/tcllib/modules/png/testimages/s04n3p01.png
new file mode 100644
index 0000000..956396c
--- /dev/null
+++ b/tcllib/modules/png/testimages/s04n3p01.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/s05i3p02.png b/tcllib/modules/png/testimages/s05i3p02.png
new file mode 100644
index 0000000..d14cbd3
--- /dev/null
+++ b/tcllib/modules/png/testimages/s05i3p02.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/s05n3p02.png b/tcllib/modules/png/testimages/s05n3p02.png
new file mode 100644
index 0000000..bf940f0
--- /dev/null
+++ b/tcllib/modules/png/testimages/s05n3p02.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/s06i3p02.png b/tcllib/modules/png/testimages/s06i3p02.png
new file mode 100644
index 0000000..456ada3
--- /dev/null
+++ b/tcllib/modules/png/testimages/s06i3p02.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/s06n3p02.png b/tcllib/modules/png/testimages/s06n3p02.png
new file mode 100644
index 0000000..501064d
--- /dev/null
+++ b/tcllib/modules/png/testimages/s06n3p02.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/s07i3p02.png b/tcllib/modules/png/testimages/s07i3p02.png
new file mode 100644
index 0000000..44b66ba
--- /dev/null
+++ b/tcllib/modules/png/testimages/s07i3p02.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/s07n3p02.png b/tcllib/modules/png/testimages/s07n3p02.png
new file mode 100644
index 0000000..6a58259
--- /dev/null
+++ b/tcllib/modules/png/testimages/s07n3p02.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/s08i3p02.png b/tcllib/modules/png/testimages/s08i3p02.png
new file mode 100644
index 0000000..acf74f3
--- /dev/null
+++ b/tcllib/modules/png/testimages/s08i3p02.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/s08n3p02.png b/tcllib/modules/png/testimages/s08n3p02.png
new file mode 100644
index 0000000..b7094e1
--- /dev/null
+++ b/tcllib/modules/png/testimages/s08n3p02.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/s09i3p02.png b/tcllib/modules/png/testimages/s09i3p02.png
new file mode 100644
index 0000000..0bfae8e
--- /dev/null
+++ b/tcllib/modules/png/testimages/s09i3p02.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/s09n3p02.png b/tcllib/modules/png/testimages/s09n3p02.png
new file mode 100644
index 0000000..711ab82
--- /dev/null
+++ b/tcllib/modules/png/testimages/s09n3p02.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/s32i3p04.png b/tcllib/modules/png/testimages/s32i3p04.png
new file mode 100644
index 0000000..0841910
--- /dev/null
+++ b/tcllib/modules/png/testimages/s32i3p04.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/s32n3p04.png b/tcllib/modules/png/testimages/s32n3p04.png
new file mode 100644
index 0000000..fa58e3e
--- /dev/null
+++ b/tcllib/modules/png/testimages/s32n3p04.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/s33i3p04.png b/tcllib/modules/png/testimages/s33i3p04.png
new file mode 100644
index 0000000..ab0dc14
--- /dev/null
+++ b/tcllib/modules/png/testimages/s33i3p04.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/s33n3p04.png b/tcllib/modules/png/testimages/s33n3p04.png
new file mode 100644
index 0000000..764f1a3
--- /dev/null
+++ b/tcllib/modules/png/testimages/s33n3p04.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/s34i3p04.png b/tcllib/modules/png/testimages/s34i3p04.png
new file mode 100644
index 0000000..bd99039
--- /dev/null
+++ b/tcllib/modules/png/testimages/s34i3p04.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/s34n3p04.png b/tcllib/modules/png/testimages/s34n3p04.png
new file mode 100644
index 0000000..9cbc68b
--- /dev/null
+++ b/tcllib/modules/png/testimages/s34n3p04.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/s35i3p04.png b/tcllib/modules/png/testimages/s35i3p04.png
new file mode 100644
index 0000000..e2a5e0a
--- /dev/null
+++ b/tcllib/modules/png/testimages/s35i3p04.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/s35n3p04.png b/tcllib/modules/png/testimages/s35n3p04.png
new file mode 100644
index 0000000..90b892e
--- /dev/null
+++ b/tcllib/modules/png/testimages/s35n3p04.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/s36i3p04.png b/tcllib/modules/png/testimages/s36i3p04.png
new file mode 100644
index 0000000..eb61b6f
--- /dev/null
+++ b/tcllib/modules/png/testimages/s36i3p04.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/s36n3p04.png b/tcllib/modules/png/testimages/s36n3p04.png
new file mode 100644
index 0000000..b38d179
--- /dev/null
+++ b/tcllib/modules/png/testimages/s36n3p04.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/s37i3p04.png b/tcllib/modules/png/testimages/s37i3p04.png
new file mode 100644
index 0000000..6e2b1e9
--- /dev/null
+++ b/tcllib/modules/png/testimages/s37i3p04.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/s37n3p04.png b/tcllib/modules/png/testimages/s37n3p04.png
new file mode 100644
index 0000000..4d3054d
--- /dev/null
+++ b/tcllib/modules/png/testimages/s37n3p04.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/s38i3p04.png b/tcllib/modules/png/testimages/s38i3p04.png
new file mode 100644
index 0000000..a0a8a14
--- /dev/null
+++ b/tcllib/modules/png/testimages/s38i3p04.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/s38n3p04.png b/tcllib/modules/png/testimages/s38n3p04.png
new file mode 100644
index 0000000..1233ed0
--- /dev/null
+++ b/tcllib/modules/png/testimages/s38n3p04.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/s39i3p04.png b/tcllib/modules/png/testimages/s39i3p04.png
new file mode 100644
index 0000000..04fee93
--- /dev/null
+++ b/tcllib/modules/png/testimages/s39i3p04.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/s39n3p04.png b/tcllib/modules/png/testimages/s39n3p04.png
new file mode 100644
index 0000000..c750100
--- /dev/null
+++ b/tcllib/modules/png/testimages/s39n3p04.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/s40i3p04.png b/tcllib/modules/png/testimages/s40i3p04.png
new file mode 100644
index 0000000..68f358b
--- /dev/null
+++ b/tcllib/modules/png/testimages/s40i3p04.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/s40n3p04.png b/tcllib/modules/png/testimages/s40n3p04.png
new file mode 100644
index 0000000..864b6b9
--- /dev/null
+++ b/tcllib/modules/png/testimages/s40n3p04.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/tbbn1g04.png b/tcllib/modules/png/testimages/tbbn1g04.png
new file mode 100644
index 0000000..fc80020
--- /dev/null
+++ b/tcllib/modules/png/testimages/tbbn1g04.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/tbbn2c16.png b/tcllib/modules/png/testimages/tbbn2c16.png
new file mode 100644
index 0000000..5abfbbb
--- /dev/null
+++ b/tcllib/modules/png/testimages/tbbn2c16.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/tbbn3p08.png b/tcllib/modules/png/testimages/tbbn3p08.png
new file mode 100644
index 0000000..4210d16
--- /dev/null
+++ b/tcllib/modules/png/testimages/tbbn3p08.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/tbgn2c16.png b/tcllib/modules/png/testimages/tbgn2c16.png
new file mode 100644
index 0000000..236c81d
--- /dev/null
+++ b/tcllib/modules/png/testimages/tbgn2c16.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/tbgn3p08.png b/tcllib/modules/png/testimages/tbgn3p08.png
new file mode 100644
index 0000000..42db232
--- /dev/null
+++ b/tcllib/modules/png/testimages/tbgn3p08.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/tbrn2c08.png b/tcllib/modules/png/testimages/tbrn2c08.png
new file mode 100644
index 0000000..8c21474
--- /dev/null
+++ b/tcllib/modules/png/testimages/tbrn2c08.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/tbwn1g16.png b/tcllib/modules/png/testimages/tbwn1g16.png
new file mode 100644
index 0000000..dba2cbb
--- /dev/null
+++ b/tcllib/modules/png/testimages/tbwn1g16.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/tbwn3p08.png b/tcllib/modules/png/testimages/tbwn3p08.png
new file mode 100644
index 0000000..7922135
--- /dev/null
+++ b/tcllib/modules/png/testimages/tbwn3p08.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/tbyn3p08.png b/tcllib/modules/png/testimages/tbyn3p08.png
new file mode 100644
index 0000000..5b2c6cb
--- /dev/null
+++ b/tcllib/modules/png/testimages/tbyn3p08.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/tp0n1g08.png b/tcllib/modules/png/testimages/tp0n1g08.png
new file mode 100644
index 0000000..caad31d
--- /dev/null
+++ b/tcllib/modules/png/testimages/tp0n1g08.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/tp0n2c08.png b/tcllib/modules/png/testimages/tp0n2c08.png
new file mode 100644
index 0000000..f26be44
--- /dev/null
+++ b/tcllib/modules/png/testimages/tp0n2c08.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/tp0n3p08.png b/tcllib/modules/png/testimages/tp0n3p08.png
new file mode 100644
index 0000000..4d6cf9e
--- /dev/null
+++ b/tcllib/modules/png/testimages/tp0n3p08.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/tp1n3p08.png b/tcllib/modules/png/testimages/tp1n3p08.png
new file mode 100644
index 0000000..6c5fd6e
--- /dev/null
+++ b/tcllib/modules/png/testimages/tp1n3p08.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/x00n0g01.png b/tcllib/modules/png/testimages/x00n0g01.png
new file mode 100644
index 0000000..db3a5fd
--- /dev/null
+++ b/tcllib/modules/png/testimages/x00n0g01.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/xcrn0g04.png b/tcllib/modules/png/testimages/xcrn0g04.png
new file mode 100644
index 0000000..5bce9f3
--- /dev/null
+++ b/tcllib/modules/png/testimages/xcrn0g04.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/xlfn0g04.png b/tcllib/modules/png/testimages/xlfn0g04.png
new file mode 100644
index 0000000..1fd104b
--- /dev/null
+++ b/tcllib/modules/png/testimages/xlfn0g04.png
@@ -0,0 +1,13 @@
+PNG
+
+
+
+
+
+IHDR )IDATx]
+0 P*@#
+
+#T10lPF`ؠF=IQ*u`%qk
+H񚈩mߟ э=,fOK
+
+t(F ;P{xp]9/p*$(*yՃ@C  cqNU#)11.rf0gh(tEkIENDB` \ No newline at end of file
diff --git a/tcllib/modules/png/testimages/z00n2c08.png b/tcllib/modules/png/testimages/z00n2c08.png
new file mode 100644
index 0000000..7669eb8
--- /dev/null
+++ b/tcllib/modules/png/testimages/z00n2c08.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/z03n2c08.png b/tcllib/modules/png/testimages/z03n2c08.png
new file mode 100644
index 0000000..bfb10de
--- /dev/null
+++ b/tcllib/modules/png/testimages/z03n2c08.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/z06n2c08.png b/tcllib/modules/png/testimages/z06n2c08.png
new file mode 100644
index 0000000..b90ebc1
--- /dev/null
+++ b/tcllib/modules/png/testimages/z06n2c08.png
Binary files differ
diff --git a/tcllib/modules/png/testimages/z09n2c08.png b/tcllib/modules/png/testimages/z09n2c08.png
new file mode 100644
index 0000000..5f191a7
--- /dev/null
+++ b/tcllib/modules/png/testimages/z09n2c08.png
Binary files differ