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