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