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