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