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