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