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