fix some function headers, removed some junk code
[imager.git] / TODO
CommitLineData
b921d414 1 *** TODO ***
b921d414 2
b8a4504c
TC
3Release Plans (subject to change)
4-------------
5
6brown-bag bugs may add intermediate releases. The dates are goals,
7not commitments.
8
b8a4504c
TC
90.45: (march 2005?)
10- audit pnm.c
11- audit tga.c
12- audit rgb.c and add tests
6ec912a5 13- capture TIFF read warnings (i_warnings tag?) (done)
b8a4504c
TC
14- add Imager::Cookbook with at least 5 recipes
15- implement i_incomplete for bmp files
6ec912a5 16- store floating point tags in an appropriate precision (done)
b8a4504c
TC
17- allow image creation to fail on malloc() failure for the image data
18 rather than aborting. The current behaviour could be a denial of
6ec912a5
TC
19 service attack. This has limited utility because of the way memory
20 over commitment works on Linux (reverted)
b8a4504c 21- eliminate unused variable warning (especially the RETVAL ones in Imager.xs)
6b64de41 22 (done)
fb591273 23- add META.yml (bypass EU::MM's limited mechanism)
84ed3ca9
TC
24- check if freetype 2 is faster/slower than freetype 1 with Imager's glyph
25 caching. If FT1 is faster, add caching as a TODO for FT2.
26- handle probing for libraries better (use pkg-config or I<library>-config
6ec912a5 27 where possible (freetype2 and libpng)) (done)
6b64de41 28- add concept index to Imager.pm pod (done, still working it)
6109e5a8 29- replace testimg/penguin-base.ppm with a smaller image
6ec912a5
TC
30- add a sample CGI HTML and image generation scripts that work together,
31 with appropriate security management
d0bd4f01 32- add sample CGI that handles an uploaded image
6ec912a5 33- examples for fountain filter in Imager::Filters
d0bd4f01
TC
34- provide access to right-side bearing information from the bounding box
35 function
b8a4504c
TC
36
370.46: (june 2005)
38- allow limits to be set on the size of an image read from a file. This is
39 to prevent an attacker supplying huge images that consume all of
40 memory causing a denial of service attack.
41- add Imager::Tutorial (see Tk::UserGuide for a structure)
42 don't cover installation - belongs in README or INSTALL
43 it doesn't need to cover everything - read/write/create/simple drawing
44 and simple text - other stuff belongs in the cookbook or in sample code
45- add 5 more recipes to Imager::Cookbook
46- implement gsamp()/gsampf()/plin() etc methods for those low level image
47 interfaces which don't yet have methods.
48- implement i_incomplete for png and gif files.
49
50Speculation
51-----------
52
53Some of what's listed below has been implemented.
54
55- should i_incomplete be optional? ie. reading a short image results in
56 an error unless the user requests incomplete images.
403946c6 57
b921d414
AMH
58Iolayer:
59- Add scalar/mmap to iolayer
a106216b 60- Add close() code to iolayer for fakeseek sources.
b921d414 61- Merge callback interface into iolayer
a106216b
AMH
62- and raw
63- Implment the maxread threshold (Indicates how much can
64 be read from a source before it stops reading from its
65 underlying source. For making sure only the relevant
66 data is read from a socket for example.
67
b921d414
AMH
68Enhanched internal structure:
69
70MultiImage & metadata support:
71- Figure what interface should be between C and perl?
72- How to store data in the C interface for tags/metadata?
73 Support tiff's madness, i.e. tags and options.
74- Error handling, make a general i_errstr object and arrange
75 such that each image has an i_errstr object to hold its
76 local errors?
77- SEE design/represent.txt for proposed new structure and
78 interface design that takes these factors into account.
faa9b3e7
TC
79- define common i_* tags for specifying attribute common among images
80 like spatial resolution (implement for other image types, especially
10461f9a
TC
81 TIFF) (Spatial resolution is supported for all types that support
82 it - are there any other common properties we can add?)
faa6fa9b 83- implement the i_incomplete tag for other formats
b921d414
AMH
84
85New Features:
a106216b 86- Add mng support, pcx and aalib support.
13db6021
TC
87 - Windows icon files (.ico)
88 - ILBM (Amiga) images
89 - photoshop files (I think I've seen docs)
90 - XBM
91 - FITS
92 - WMF (extract bitmap data on read)
93 - gzip or bzip2 compressed raw
10461f9a 94 - postscript for output
ee6f9750 95 - PAM file support (man pam in recent PNM tools)
5f5fe73e 96
b921d414
AMH
97- Transforms, interpolated multidimensional lookup tables.
98 Usefull for CMYK <-> RGB table lookup.
99
a106216b 100- advanced font layout (spacing, kerning, alignment) (Artur?)
faa9b3e7 101
bf9dd17c 102- ways to check if characters are present in a font, eg. checking if
9c5ed9a7 103 ligatures are present (done for FreeType2)
bf9dd17c 104
faa9b3e7
TC
105- font synthesis - synthesize a bold or slanted font from a normal font
106 (or even from an existing bold or slanted font)
bf9dd17c 107
faa9b3e7 108- utf8 support for text output
9a71bc09 109 (available for FT1, freetype2, should be easy for Win32)
c855ad0e
TC
110
111- easy interfaces for text output:
112 - align text around point, including:
113 - left, center, right horizontal alignment
114 - top, center, baseline, bottom alignment
115 - choose whether to base alignment upon character cells or font
116 metrics to avoid spacing problems between lines
117 - fill a box from text, with newline handling
118 - an option to just return the information that would be used to
119 output the text, so it can be used for sizing calculations
120 - how much text fit in the box/how much space is left in the box
121 - fill a box with rich text (size and font changes)
122 - as above
123 - wrapping around boxes/images
124 - pod2Imager :)
125
126- tools to get more information about fonts/characters:
127 - name of font "Arial Bold Italic" vs "arialbi.ttf"
128 - ABC widths for characters (currently the only way to get the C width
129 for a character is to get the width with a following space and without
130 and then compare)
131 - character names
132
133- encodings for text output (maybe using the Encode module to work
134 between encodings)
faa9b3e7
TC
135
136- image rotation, 3 ways of doing rotation:
faa9b3e7
TC
137 - rotation by shearing, which produces makes lengths in the image larger,
138 but could be useful
a010a7d3 139 (2 of the 3 have been done)
faa9b3e7 140
9c5ed9a7
TC
141- read_multi() needs to handle other multi-image types,
142 (handles TIFF and GIF)
b921d414 143
9c5ed9a7 144- write_multi() to save other multi-image types, (handles TIFF and GIF)
8b695554 145 - pnm binary formats support multiple images per file
f62b2d84 146
362e7486
TC
147- compose channels - build a new image based on channels from several
148 images
149
da77e827
TC
150- arc outlines
151
9a71bc09
TC
152- complex lines/curves:
153 - thick lines:
154 - dotted/dashed lines
155 - doubled lines?
156 - end-point controls (butt-end, square-end, round-end, pointy, arrows)
157 - brush-lines (as with the Gimp, or Photoshop)
158 - more complex with multiple strokes and various randomness as with
159 Fractal Design Painter (or later versions of Corel Photo Paint)
160 - complex line shapes:
161 - lines
162 - general curves (cubic or bezier, whichever is more general)
163 - easy access to general curves:
164 - points to make a nice curve from
165 - various circular curves (centre, radii, start/end angles,
166 direction)
167 - Complex thick lines are probably more useful than brush-lines for
168 the things I expect Imager to be used for.
169 - http://www.develop-help.com/imager/strokes.png (.jpg for smaller version)
170
ea9e6c3f
TC
171- have Imager::Color{::Float}? use Graphics::ColorNames if present.
172
b921d414
AMH
173Clean up:
174- Make sure everything is doable with the OO interface
5f5fe73e 175 i_flood_fill() for example.
45a1d9d2 176 - include low-level functions like gsamp() and so on
f1ac5027 177
b921d414
AMH
178- Compile with memory debugging enabled and fix all leaks
179
a106216b 180- Add mycalloc() memory allocation wrappers.
b921d414
AMH
181
182- should we overload <=> or cmp for Imager::Color objects?
183 too many worms, leave it out
184
185- should the interlace option for reading raw images have
186 symbolic names in the OO interface?
187
f2bc9b80
TC
188- improve consistency in the interfaces, both in trying to use named
189 parameters where possible but also in using consistent names, eg.
190 (tx, ty) vs (left, top) in rubthrough() vs paste(). Do we want a (simple)
191 standard for this (suggested names)? Remember to preserve the old
192 interface where possible.
b921d414 193
c855ad0e
TC
194- try to clean up the inconsistencies between font types:
195 - utf8 (even if we just treat characters over 0xFF as missing for T1)
3799c4d1 196 (done for FT2, FT1, T1)
eeaa33fd 197 - transformations (done for FT2)
3799c4d1 198 - has_char() method (done for FT2, FT1, T1)
c855ad0e 199
b921d414 200Format specific issues:
b921d414
AMH
201- provide patches for libgif and libungif that fix their bugs
202 and give a useful extension interface. Probe for the
203 installation of the patches in Makefile.PL to let gif.c
204 know what features it can use.
205
a106216b 206- Add options for pnm writer to save in any of the p1..P6
b921d414
AMH
207 formats. Even if the input has 1 channel, write 3 and such
208 cases. Also allow ascii mode. Need to be able to write
209 pbm images which needs ties to the quantization code.
210
a106216b 211- save paletted images as paletted where that's supported. Done
f62b2d84 212 for gif/tga/bmp/tiff. Not done for png yet.
f873cb01 213
a106216b 214- read other format paletted images as paletted images. This has
f62b2d84
TC
215 been done for gif/tga/bmp/tiff formats but not for png.
216
217- read/write 16-bit/sample images as such for tiff
27d9683e 218
faa6fa9b
TC
219- read more metadata from images, esp tiff tags, EXIF format information
220 from TIFF and JPEG.
221
7ac6a2e9
TC
222- handle 16-bit/sample pgm/ppm files
223
b921d414
AMH
224Documentation:
225- Add to the documentation
226- Write a tutorial?
faa9b3e7
TC
227- sample code and Imager/Samples.pod describing them
228- Imager/Cookbook.pod
b921d414
AMH
229- Write a guide to installing the helper libraries
230- Go through the entire project and add comments in pod
231 so doco.perl can be used to read them.
faa6fa9b 232- see the IRC log in design/doclayout.txt
6d0ed98a
TC
233- method index?
234- concept index?
ea9e6c3f
TC
235
236Build/configure:
237- use prompt() (from ExtUtils::MakeMaker) for questions in Makefile.PL
238- use the library's mechanism's to find the library if needed, for
239 example, freetype-config for FT2
240- the freetype2 library is built as "freetype.lib" on Win32 and needs
241 to be renamed to be found by the configuration process and included
242 with -lfreetype. Try to work around that.
243- freetype2 and freetype1 tend to be installed in /usr/include/freetype2
244 and /usr/include/freetype directories, or similarly named (somedir/freetype
245 for example), instead of putting these directly into the search path
246 search for the freetype{2}?/someheader and then add the subdirectory if
247 we find the file in that directory.
7ac6a2e9 248- switch to Test::More
5e9890e1 249- change headers to use more unique re-include protection macros
6b64de41
TC
250
251Old release checklists
252----------------------
253
2540.44: (december 2004)
255- set i_format for every file type on read and test for it:
256 - bmp - done
257 - jpeg - done
258 - tiff - done
259 - tga - done
260 - rgb - no read function anyway
261 - png - done
262 - gif - done
263 - pnm - done
264 - raw - done
265- check each file reader for possible integer overflows
266 - bmp - done
267 - tiff
268 - tga
269 - rgb
270 - png
271 - gif
272 - pnm
273- check bmp code uses image data offset correctly - done
274- check quant code for integer overflows - done
275- check for old URLs (umich and imager.perl.org/~addi/...) - done
276