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