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