<pngtester.cgi> v0.8a May 3 2001
This is a CGI script that tabulates, as HTML, the information
of chunks contained in one or more PNG, JNG and MNG files.
History:
v0.8 May 2 2001 -- PPLT was supported. A subroutine was replaced
by unpack("Hx",xxx) code.
v0.8a May 3 2001 -- Wrong comment, when IDAT chunks came
continuously, was mended.
Supported chunks (v0.8 and later):
MHDR, IHDR, DHDR, JHDR, BASI, BACK, PLTE, DEFI, FRAM, TERM,
IDAT, LOOP, ENDL, SHOW, MOVE, CLON, CLIP, DISC, PAST, MAGN,
SAVE, SEEK, PROM, DROP, DBYK, ORDR, PPLT, gAMA, sBIT, sRGB,
sPLT, iCCP, tIME, cHRM, eXPI, fPRI, nEED, bKGD, hIST, tRNS,
pHYs, tEXt, zTXt, iTXt
* iCCP, zTXt, iTXt -- Neither compressed data nor UTF8-encoded
data can be shown yet.
Usage:
http://(path)/pngtester.cgi?Filename1[&Filename2][&Filename3]...
Call pngtester.cgi from your browser, and this CGI will read
one or more files (designated by Filenames1, 2, 3, etc.) and
tabulates the information of chunks contained in the file(s)
as follows:
| PNG | Bytes | Chunk Data | CRC |
| IHDR | 13 | 24 x 24, 4 bits, palletted, basic filter, not interlaced | OK |
| PLTE | 48 | 16 pallet entries: #000000, #800000, #008000, #808000, #000080, #800080, #008080, #c0c0c0, #808080, #ff0000, #00ff00, #ffff00, #0000ff, #ff00ff, #00ffff, #ffffff |
OK |
| IDAT | 62 | 32K window size, default argorithm | OK |
| IEND | 0 | @ | OK |
| PNG | Bytes | Chunk Data | CRC |
| IHDR | 13 | 24 x 24, 4 bits, palletted, basic filter, not interlaced | OK |
| PLTE | 48 | 16 pallet entries: #000000, #800000, #008000, #808000, #000080, #800080, #008080, #c0c0c0, #808080, #ff0000, #00ff00, #ffff00, #0000ff, #ff00ff, #00ffff, #ffffff |
OK |
| IDAT | 58 | 32K window size, default argorithm | OK |
| IEND | 0 | @ | OK |
<addtRNS.cgi> v0.4c April 28 2001 This is a CGI script that adds a tRNS chunk to a PNG image and displays the tRNS-including PNG image without writing the tRNS chunk into the PNG file. If there has been already any tRNS chunk in this PNG file, this CGI replaces the tRNS chunk with a new one and displays the new tRNS-including PNG image without writing the tRNS chunk into the PNG file. The new tRNS-including PNG image generated by this CGI will be able to be saved as a new file through your clicking the right button of a mouse on the image. Usage: 1. To add a tRNS chunk to a PNG image with 8- or 16-bit RGB color depth, addtRNS.cgi?-t(Transparent color)-n(Filename) in which (Transparent color) is 6 or 12 hexadecimal digits, and (Filename) is the name of a PNG file. The hexadecimal digits are in a range of from 000000 to ffffff in the case of 8-bit RGB color depth or in a range of from 000000000000 to ffffffffffff in the case of 16-bit RGB color depth. -- eg. addtRNS.cgi?-tffffff-nSAMPLE.png -- eg. addtRNS.cgi?-tffffffffffff-nSAMPLE.png 2. To add a tRNS chunk to a PNG image with 1-, 2-, 4-, 8- or 16-bit grayscale depth, addtRNS.cgi?-g(Transparent gray)-n(Filename) in which (Transparent gray) is 1, 2 or 4 hexadecimal digits, and (Filename) is the name of a PNG file. The hexadecimal digits are in a range of from 0 to 1 in the case of 1-bit grayscale depth, in a range of from 0 to 3 in the case of 2-bit grayscale depth, in a range of from 0 to f in the case of 4-bit grayscale depth, in a range of from 00 to ff in the case of 8-bit grayscale depth or in a range of from 0000 to ffff in the case of 16-bit grayscale depth. -- eg. addtRNS.cgi?-gf-nSAMPLE.png -- eg. addtRNS.cgi?-gff-nSAMPLE.png -- eg. addtRNS.cgi?-gffff-nSAMPLE.png 3. To add a tRNS chunk to a PNG image with palleted color, addtRNS.cgi?-p(Index1,Alpha1[/Index2,Alpha2]...)-n(Filename) in which each Index represents a pallet index of one or two hexadecimal digits, each Alpha representes intransparency of one or two hexadecimal digits, and (Filename) is the name of a PNG file. The hexadecimal digits for each Index are in a range of from 00 to ff. The hexadecimal digits for each Alpha are also in a range of 00 to ff (00 shows transparency, and ff shows intransparency). -- eg. addtRNS.cgi?-p00,00/05,00-nSAMPLE.png 4. To obtain image information from a PNG file, addtRNS.cgi?-n(Filename) in which (Filename) is the name of the PNG file. -- eg. addtRNS.cgi?-nSAMPLE.png In case of 4, image information is displayed as follows:
| 00 | 01 | 02 | 03 | 04 | 05 | 06 | 07 |
| | | | | | | | | | | | | | | | |
| #000000 | #800000 | #008000 | #808000 | #000080 | #800080 | #008080 | #c0c0c0 |
| 08 | 09 | 0a | 0b | 0c | 0d | 0e | 0f |
| | | | | | | | | | | | | | | | |
| #808080 | #ff0000 | #00ff00 | #ffff00 | #0000ff | #ff00ff | #00ffff | #ffffff |
<txtcut.cgi> v0.3 May 2 2001 This is a CGI script that removes all textual chunks (tEXt, zTXt, iTXt) from a PNG image and displays the resulting PNG image without changing the original PNG file. If you want to save the resulting image, you can save this image as a new file through clicking the right button of a mouse on this image. * txtcut.cgi v0.2c and before -- iTXt is'nt contained in the textual chunks that can be removed by txt.cgi. Usage: http://(Path)/txtcut.cgi?Filename Filename is the name of a PNG file from which you want to remove textual chunks.