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