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