-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
285 lines (201 loc) · 8.92 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
########################## PNGwriter #########################################
#
# Website: Main: http://pngwriter.sourceforge.net/
# Sourceforge.net: http://sourceforge.net/projects/pngwriter/
# Freshmeat.net: http://freshmeat.net/projects/pngwriter/
#
# Author: Paul Blackburn
#
# Email: [email protected]
#
# Version: 0.5.4 (19 / II / 2009)
#
# Description: Library that allows plotting a 48 bit
# PNG image pixel by pixel, which can
# then be opened with a graphics program.
#
# License: GNU General Public License
# (C) 2002, 2003, 2004, 2005, 2006,
# 2007, 2008, 2009 Paul Blackburn
##########################################################################
PNGwriter
Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Paul Blackburn
#######################################################################
IMPORTANT - IMPORTANTE
The Spanish README and documentation can be found in doc/espaniol
El archivo LEAME y la documentacion en castellano esta en doc/espaniol
#######################################################################
#######################################################################
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#######################################################################
CONTACTS
Author's Email: [email protected]
Home page: http://pngwriter.sourceforge.net/
Sourceforge.net project page: http://sourceforge.net/projects/pngwriter/
Freshmeat.net project page: http://freshmeat.net/projects/pngwriter/
INTRODUCTION
Hi. Thanks for downloading PNGwriter. I hope you find it
useful. See doc/english/CHANGES to see what's new.
DESCRIPTION
PNGwriter is a very easy to use open source graphics library that uses PNG
as its output format. The interface has been designed to be as simple and
intuitive as possible. It supports plotting and reading in the RGB
(red, green, blue), HSV (hue, saturation, value/brightness) and CMYK
(cyan, magenta, yellow, black) colour spaces, basic shapes, scaling, bilinear
interpolation, full TrueType antialiased and rotated text support, bezier curves,
opening existing PNG images and more. Documentation in English and Spanish.
Runs under Linux, Unix, Mac OS X and Windows. Requires libpng and optionally
FreeType2 for the text support.
REQUIREMENTS
LibPNG (http://www.libpng.org/)
PNGwriter requires a properly installed libpng in order to work.
Freetype 2 (http://www.freetype.org)
PNGwriter uses FreeType 2 to render antialiased text with kerning, but
it can be compiled without support for this. See below.
Fonts
If you are going to use PNGwriter's plot_text() function to plot text,
then you'll need a TrueType font file. PNGwriter installs a few from
the Free UCS Outline Fonts Project
(http://savannah.nongnu.org/projects/freefont) in
/usr/local/share/pngwriter/fonts to get you started, or under whatever
directory you chose with PREFIX at install time. See below.
INSTALLATION
Before you do anything, check the 'make.include' file and make sure it is a
symbolic link to either one of 'make.include.linux' or
'make.include.osx'.
The current setting to 'make.include.linux' should cover most systems,
including OS X. See below.
If you have an OS X system with libpng and FreeType2 installed via
Fink in /sw, or via MacPorts in /opt, edit and then use
'make.include.osx'. It is generally not necessary to use
make.include.osx on an OS X system if you are compiling with FreeType2
support. This is because the FreeType2 helper program freetype-config,
called at compile time, will actually provide the correct library and
header paths for your Fink or MacPorts distribution. In short, if
you're on OS X, just give make.include.linux a try, and if it doesn't
work, then tinker with make.include.osx
If you are using an old compiler, you may want to use
'make.include.linux.oldcpp', or alter your own makefile by adding
-DOLD_CPP to the compiler flags.
If you wish to compile PNGwriter without FreeType2 support, then open
make.include with your text editor and uncomment the line that says
# P_FREETYPE = 1
or, when compiling, add P_FREETYPE=1 to make's arguments.
Note that every time you compile a project that uses PNGwriter, and
PNGwriter has been compiled without FreeType2 support, you will have to
add -DNO_FREETYPE to your compilation flags.
To compile PNGwriter, just type
make
and then, as Root,
make install
If you are not root, or do not want to install in the default
location (/usr/local/, set in make.include), then specify the location
with PREFIX when calling make, like this:
make PREFIX=$HOME (for example)
or
make PREFIX=$HOME/programming (for example)
The default installation locations are:
- libpngwriter.a in /usr/local/lib
- pngwriter.h in /usr/local/include
- The documentation in /usr/local/share/doc/pngwriter/doc/
- The examples in /usr/local/share/doc/pngwriter/examples/
- A few fonts in /usr/local/share/pngwriter/fonts
After installation, the following lines will list the installed
location of the software (determined from whatever PREFIX was at
install time):
- libpngwriter.a:
- pngwriter.h:
- documentation:
- examples:
- fonts:
Look in examples/ for two examples of PNGwriter's use, and in
doc/english/EXAMPLES for an explanation.
SUPPORT
For examples, a FAQ, etc, take a look at the PNGwriter Home page:
http://pngwriter.sourceforge.net/
If you have a problem or a suggestion, you can use the support forum at
http://sourceforge.net/projects/pngwriter/
You can also email me at the address shown in the header. I would really like to hear
from you and what you are using PNGwriter for.
LEGAL
This library and its code are distributed under the GNU General
Public License. The complete text of the license is included in this
distribution.
UPDATES
New versions will appear from time to time so check the web page.
http://pngwriter.sourceforge.net/
and
http://sourceforge.net/projects/pngwriter/
You can also stay updated by checking PNGwriter's freshmeat.net page:
http://freshmeat.net/projects/pngwriter/
WHAT'S IN THIS RELEASE?
pngwriter-x.y.z
|-- Makefile
|-- README
|-- configure
|-- doc
| |-- english
| | |-- CHANGES
| | |-- EXAMPLES
| | |-- LICENSE
| | |-- PNGwriterQuickReference_EN.pdf
| | `-- README
| `-- espaniol
| |-- CAMBIOS
| |-- EJEMPLOS
| |-- LEAME
| |-- LICENCIA
| `-- PNGwriterQuickReference_ES.pdf
|-- examples
| |-- Makefile
| |-- burro.png
| |-- lyapunov.cc
| |-- lyapunov.espaniol.cc
| |-- pngtest.cc
| `-- pngtest.espaniol.cc
|-- fonts
| |-- FreeMonoBold.ttf
| `-- FreeSansBold.ttf
|-- make.include -> make.include.linux
|-- make.include.linux
|-- make.include.linux.oldcpp
|-- make.include.osx
`-- src
|-- Makefile
|-- pngwriter.cc
`-- pngwriter.h
THANKS
In no particular order, thanks to
> Xavier Andrade, Debian Package Maintainer for version 0.3.6
> Andres Kievsky
> Jorgen Pehrson, for the settext() function.
> Nadav Rotem, for suggesting the bezier() function.
> Jeramy Webb ([email protected]), for his generosity.
> Mike Heller ([email protected]), for his generosity.
> Benjamin Raskob, for bringing to my attention the need for a resize() function.
> Dr John Charlery, for his continued support with the Windows-specific documentation.
> Tobias Kretz, for pointing out a bug in readfromfile(), and
> Greg Roelofs and John Bowler on png-implement for their help fixing the bug.
> Gurkan Sengun ([email protected], http://www.linuks.mine.nu/)
for the filledtriangle() code.
> Miguel Gea ([email protected]), Debian Package Maintainer for
versions > 0.5.1
> Carsten Klapp ([email protected]), for his help
with the Fink package.
> Sven, who posted anonymously on the PNGwriter forum
concerning readfromfile()
> Mikkel ([email protected]) for expanding on Sven's code, greatly
increasing the variety of PNGs that PNGwriter can open.
Have fun and tell me what you're up to!
Paul Blackburn