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