aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/irrlicht-1.8/source/Irrlicht/libpng/contrib/pngminus/README
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/irrlicht-1.8/source/Irrlicht/libpng/contrib/pngminus/README')
-rw-r--r--libraries/irrlicht-1.8/source/Irrlicht/libpng/contrib/pngminus/README306
1 files changed, 153 insertions, 153 deletions
diff --git a/libraries/irrlicht-1.8/source/Irrlicht/libpng/contrib/pngminus/README b/libraries/irrlicht-1.8/source/Irrlicht/libpng/contrib/pngminus/README
index b0516ec..bbe7407 100644
--- a/libraries/irrlicht-1.8/source/Irrlicht/libpng/contrib/pngminus/README
+++ b/libraries/irrlicht-1.8/source/Irrlicht/libpng/contrib/pngminus/README
@@ -1,153 +1,153 @@
1PngMinus 1PngMinus
2-------- 2--------
3(copyright Willem van Schaik, 1999) 3(copyright Willem van Schaik, 1999)
4 4
5 5
6License 6License
7------- 7-------
8 8
9Permission to use, copy, modify, and distribute this software and 9Permission to use, copy, modify, and distribute this software and
10its documentation for any purpose and without fee is hereby granted, 10its documentation for any purpose and without fee is hereby granted,
11provided that the above copyright notice appear in all copies and 11provided that the above copyright notice appear in all copies and
12that both that copyright notice and this permission notice appear in 12that both that copyright notice and this permission notice appear in
13supporting documentation. This software is provided "as is" without 13supporting documentation. This software is provided "as is" without
14express or implied warranty. 14express or implied warranty.
15 15
16 16
17Some history 17Some history
18------------ 18------------
19Soon after the creation of PNG in 1995, the need was felt for a set of 19Soon after the creation of PNG in 1995, the need was felt for a set of
20pnmtopng / pngtopnm utilities. Independantly Alexander Lehmann and I 20pnmtopng / pngtopnm utilities. Independantly Alexander Lehmann and I
21(Willem van Schaik) started such a project. Luckily we discovered this 21(Willem van Schaik) started such a project. Luckily we discovered this
22and merged the two together into pnmtopng.tar.gz, which is available 22and merged the two together into pnmtopng.tar.gz, which is available
23from a/o ftp://ftp.simplesystems.org/pub/libpng/png/. 23from a/o ftp://ftp.simplesystems.org/pub/libpng/png/.
24 24
25These two utilities have many, many options and make use of most of the 25These two utilities have many, many options and make use of most of the
26features of PNG, like gamma, alpha, sbit, text-chunks, etc. This makes 26features of PNG, like gamma, alpha, sbit, text-chunks, etc. This makes
27the utilities quite complex and by now not anymore very maintainable. 27the utilities quite complex and by now not anymore very maintainable.
28When we wrote these programs, libpng was still in an early stage. 28When we wrote these programs, libpng was still in an early stage.
29Therefore, lots of the functionality that we put in our software can now 29Therefore, lots of the functionality that we put in our software can now
30be done using transform-functions in libpng. 30be done using transform-functions in libpng.
31 31
32Finally, to compile these programs, you need to have installed and 32Finally, to compile these programs, you need to have installed and
33compiled three libraries: libpng, zlib and netpbm. Especially the latter 33compiled three libraries: libpng, zlib and netpbm. Especially the latter
34makes the whole setup a bit bulky. But that's unavoidable given the many 34makes the whole setup a bit bulky. But that's unavoidable given the many
35features of pnmtopng. 35features of pnmtopng.
36 36
37 37
38What now 38What now
39-------- 39--------
40At this moment libpng is in a very stable state and can do much of the 40At this moment libpng is in a very stable state and can do much of the
41work done in pnmtopng. Also, pnmtopng needs to be upgraded to the new 41work done in pnmtopng. Also, pnmtopng needs to be upgraded to the new
42interface of libpng. Hence, it is time for a rewrite from the ground up 42interface of libpng. Hence, it is time for a rewrite from the ground up
43of pnmtopng and pngtopnm. This will happen in the near future (stay 43of pnmtopng and pngtopnm. This will happen in the near future (stay
44tuned). The new package will get a different name to distinguish it from 44tuned). The new package will get a different name to distinguish it from
45the old one: PngPlus. 45the old one: PngPlus.
46 46
47To experiment a bit with the new interface of libpng, I started off with 47To experiment a bit with the new interface of libpng, I started off with
48a small prototype that contains only the basic functionality. It doesn't 48a small prototype that contains only the basic functionality. It doesn't
49have any of the options to read or write special chunks and it will do 49have any of the options to read or write special chunks and it will do
50no gamma correction. But this makes it also a simple program that is 50no gamma correction. But this makes it also a simple program that is
51quite easy to understand and can serve well as a template for other 51quite easy to understand and can serve well as a template for other
52software developments. (By now there are of course a couple of programs, 52software developments. (By now there are of course a couple of programs,
53like Greg Roelofs' rpng/wpng, that can be used just as good.) 53like Greg Roelofs' rpng/wpng, that can be used just as good.)
54 54
55 55
56Can and can not 56Can and can not
57--------------- 57---------------
58As this is the small brother of the future PngPlus, I called this fellow 58As this is the small brother of the future PngPlus, I called this fellow
59PngMinus. Because I started this development in good-old Turbo-C, I 59PngMinus. Because I started this development in good-old Turbo-C, I
60avoided the use the netpbm library, which requires DOS extenders. Again, 60avoided the use the netpbm library, which requires DOS extenders. Again,
61another reason to call it PngMinus (minus netpbm :-). So, part of the 61another reason to call it PngMinus (minus netpbm :-). So, part of the
62program are some elementary routines to read / write pgm- and ppm-files. 62program are some elementary routines to read / write pgm- and ppm-files.
63It does not read b&w pbm-files. 63It does not read b&w pbm-files.
64 64
65The downside of this approach is that you can not use them on images 65The downside of this approach is that you can not use them on images
66that require blocks of memory bigger than 64k (the DOS version). For 66that require blocks of memory bigger than 64k (the DOS version). For
67larger images you will get an out-of-memory error. 67larger images you will get an out-of-memory error.
68 68
69As said before, PngMinus doesn't correct for gamma. When reading 69As said before, PngMinus doesn't correct for gamma. When reading
70png-files you can do this just as well by piping the output of png2pnm 70png-files you can do this just as well by piping the output of png2pnm
71to pnmgamma, one of the standard PbmPlus tools. This same scenario will 71to pnmgamma, one of the standard PbmPlus tools. This same scenario will
72most probably also be followed in the full-blown future PngPlus, with 72most probably also be followed in the full-blown future PngPlus, with
73the addition of course of the possibility to create gamma-chunks when 73the addition of course of the possibility to create gamma-chunks when
74writing png-files. 74writing png-files.
75 75
76On the other hand it supports alpha-channels. When reading a png-image 76On the other hand it supports alpha-channels. When reading a png-image
77you can write the alpha-channel into a pgm-file. And when creating an 77you can write the alpha-channel into a pgm-file. And when creating an
78RGB+A png-image, you just combine a ppm-file with a corresponding 78RGB+A png-image, you just combine a ppm-file with a corresponding
79pgm-file containing the alpha-channel. When reading, transparency chunks 79pgm-file containing the alpha-channel. When reading, transparency chunks
80are converted into an alpha-channel and from there on treated the same 80are converted into an alpha-channel and from there on treated the same
81way. 81way.
82 82
83Finally you can opt for writing ascii or binary pgm- and ppm-files. When 83Finally you can opt for writing ascii or binary pgm- and ppm-files. When
84the bit-depth is 16, the format will always be ascii. 84the bit-depth is 16, the format will always be ascii.
85 85
86 86
87Using it 87Using it
88-------- 88--------
89To distinguish them from pnmtopng and PngPlus, the utilities are named 89To distinguish them from pnmtopng and PngPlus, the utilities are named
90png2pnm and pnm2png (2 instead of to). The input- and output-files can 90png2pnm and pnm2png (2 instead of to). The input- and output-files can
91be given as parameters or through redirection. Therefore the programs 91be given as parameters or through redirection. Therefore the programs
92can be part of a pipe. 92can be part of a pipe.
93 93
94To list the options type "png2pnm -h" or "pnm2png -h". 94To list the options type "png2pnm -h" or "pnm2png -h".
95 95
96 96
97Just like Scandinavian furniture 97Just like Scandinavian furniture
98-------------------------------- 98--------------------------------
99You have to put it together yourself. I did test the software under 99You have to put it together yourself. I did test the software under
100MS-DOS with Turbo-C 3.0 and under RedHat Linux 4.2 with gcc. In both 100MS-DOS with Turbo-C 3.0 and under RedHat Linux 4.2 with gcc. In both
101cases I used libpng-1.0.4 and zlib-1.1.3. Later versions should be OK, 101cases I used libpng-1.0.4 and zlib-1.1.3. Later versions should be OK,
102however some older libpng versions have a bug in pngmem.c when using 102however some older libpng versions have a bug in pngmem.c when using
103Turbo-C 3.0 (see below). 103Turbo-C 3.0 (see below).
104 104
105You can build it using one of the two makefiles (make -f makefile.###) 105You can build it using one of the two makefiles (make -f makefile.###)
106or use the batch/script files pngminus.bat / pngminus.sh. This assumes 106or use the batch/script files pngminus.bat / pngminus.sh. This assumes
107that you have built the libraries in ../libpng and ../zlib. Using Linux, 107that you have built the libraries in ../libpng and ../zlib. Using Linux,
108make sure that you have built libpng with makefile.std and not 108make sure that you have built libpng with makefile.std and not
109makefile.linux (also called .lnx in earlier versions of libpng). The 109makefile.linux (also called .lnx in earlier versions of libpng). The
110latter creates a .so shared-library, while the PngMinus makefile assumes 110latter creates a .so shared-library, while the PngMinus makefile assumes
111a normal .a static library. 111a normal .a static library.
112 112
113If you create a ../pngsuite directory and then store the basn####.png 113If you create a ../pngsuite directory and then store the basn####.png
114files from PngSuite (http://www.schaik.com/pngsuite/) in there, you can 114files from PngSuite (http://www.schaik.com/pngsuite/) in there, you can
115test in one go the proper functioning of PngMinus, see png2pnm.bat and 115test in one go the proper functioning of PngMinus, see png2pnm.bat and
116pnm2png.bat (or the .sh versions). 116pnm2png.bat (or the .sh versions).
117 117
118 118
119Warranty 119Warranty
120------- 120-------
121Please, remember that this was just a small experiment to learn a few 121Please, remember that this was just a small experiment to learn a few
122things. It will have many unforeseen features <vbg>. Who said bugs? Use 122things. It will have many unforeseen features <vbg>. Who said bugs? Use
123it when you are in need for something simple or when you want to start 123it when you are in need for something simple or when you want to start
124developing your own stuff. 124developing your own stuff.
125 125
126 126
127The Turbo bug 127The Turbo bug
128------------- 128-------------
129** pngmem.old 129** pngmem.old
130 hptr = (png_byte huge *)((long)(hptr) & 0xfffffff0L); 130 hptr = (png_byte huge *)((long)(hptr) & 0xfffffff0L);
131 hptr += 16L; 131 hptr += 16L;
132** pngmem.c 132** pngmem.c
133 hptr = (png_byte huge *)((long)(hptr) & 0xfffffff0L); 133 hptr = (png_byte huge *)((long)(hptr) & 0xfffffff0L);
134 hptr = hptr + 16L; 134 hptr = hptr + 16L;
135** 135**
136 136
137** pngmem.old 137** pngmem.old
138 png_ptr->offset_table_ptr[i] = (png_bytep)hptr; 138 png_ptr->offset_table_ptr[i] = (png_bytep)hptr;
139 hptr += (png_uint_32)65536L; 139 hptr += (png_uint_32)65536L;
140** pngmem.c 140** pngmem.c
141 png_ptr->offset_table_ptr[i] = (png_bytep)hptr; 141 png_ptr->offset_table_ptr[i] = (png_bytep)hptr;
142 hptr = hptr + 65536L; 142 hptr = hptr + 65536L;
143** 143**
144 144
145 145
146The end 146The end
147------- 147-------
148Willem van Schaik 148Willem van Schaik
149mailto:willem@schaik.com 149mailto:willem@schaik.com
150http://www.schaik.com/png/ 150http://www.schaik.com/png/
151------- 151-------
152Oct 1999 152Oct 1999
153 153