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