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