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