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