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