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