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