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