Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 596 lines (428 sloc) 18.611 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595
                         *** TODO ***

Release Plans (subject to change)
-------------

brown-bag bugs may add intermediate releases. The dates are goals,
not commitments.

For 0.65:

PNG re-work (#29268)

For 0.64: (speculative)

thick lines (#28854)

have alpha channel work treated as coverage for primitives (more
general combine parameter)

add some extra combine modes (hard/soft light, screen)

For 0.63:

general alpha channel fixes (#29879, etc) (done)

give 4/2 channel images a background color when saving to pnm (#30074)
(done)

give 4/2 channel images a background color when saving to BMP (#30075)
(done)

give 4/2 channel images a background color when saving to JPEG
(#29876)


For 0.62:

TIFF improvements (to be detailed) (#20329) (done)
 - read/write 16-bit RGB w/ and w/o alpha
 - read 16-bit CMYK w/ and w/o alpha
 - read/write 32-bit RGB w/ and w/o alpha
 - read 32-bit CMYK w/ and w/o alpha
 - write mono images as bi-level
 - read bi-level image as mono/paletted
 - read/write 16/32 grayscale w/ and w/o alpha
both contig and non-contiguous
 - possible extra code for handling 8-bit CMYK (#29353)

Makefile.PL --incpath and --libpath should expand ~/ paths (#29484)

scaling alpha channel image issues (done)

PBM images inverted (#30859) (might be fixed in TIFF branch) (was,
added test, done)

don't load B at compile-time in t82inline.t (#30508) (done)

the hardinvert filter inverts the alpha channels, this probably isn't
desirable (#30002) (done)

"dh-make-perl --build --cpan Imager" fails on require Makefile.PL
(#30520) (fixed)

Wrong link in Imager Pod (#30889) (done)

more diagnostics in 5/t57infix.t (fixed the problem)

extract out the scale() scale factor calculations (done)

For 0.61:

regmach.c fixes/tests (#29296) (done)

sample: scaling an animated gif (#27591) (done)

transform2() docs (#29267) (done)

i_gsamp() chan_count validation (#28985) (done)

Imager::Font::Wrap doesn't correctly set savepos (#29771) (done)

testdrive warnings (#29610) (done)

Imager::Files still refers to rgb file type (#29354) (done)

t/t01introvert test failure line 495 (#29413) (done)

Imager::Expr::Infix problem (#29562) (done)

CMYK alpha TIFF problems with old libtiff (#29353) (done)

matrix_transform() should use fabs() instead of abs() range checking
sz (#29936) (done)

warning compiling datatypes.c on x64 (#30204) (done)

dynfilt/t/t60dyntest.t relies on a file that may not exist (#30203)
(done)

Imager::Font::Wrap doesn't correctly set savepos (#29771) (done)

For 0.60 (hopefully):

RGB file support (#8666) (done)

convert() doesn't preserve sample size (#28492) (done)

be explicit that scale*() doesn't modify the source (#28570) (done)

repeated text in Imager::Files (#27589) (done)

error message when loading an unsupported font format is confusing (#27571) (done)

enable transparency by default for gif (#27615) (done)

Imager doesn't load on Windows 98 (#27653) (done)

new color counting code (#28142) (done)

sample: scaling an animated gif (#27591)

test getcolorcount() (done)

do a compiler warning clean up run (done)

change the ico/cur reader to apply the mask as an alpha channel by
default (#29001) (done)

For 0.58:

rgb.txt search (and testing) (#26064) (done)

guassian blur radius (#25645) (done)

text rendering FT1 (#11972) (done)

text rendering T1 (#11972) (done)

For 0.57

BMP security fix only

For 0.56:

checking testing of new ft2 rendering (done)

possibly: use renderer on other fonts

check testing of new ppm input (done)

check testing of new ppm output (done)

check lbr's font output issue (done)

tests for monochrome makemap (done)

correct handling of old Data::Dumper (#24391) (done)

fix unsharpmask documentation (#25531) (done)

work around compiler bug on OS X (#25561) (done)

BEFORE 0.54

OO interface for i_plin/i_glin (done)

remove gif query from makefile.pl (done)

fallback for read/write_multi to read/write

pnmscale based alternative scale method (done)

rubthrough 4 on 4 (done)

replace dummy test script in dynfilt with a real one (done)

BEFORE 0.50:

skip t82inline.t tests if directory has spaces in name

integrate pod coverage tests

rework iolayers

add .ico support

note lack of IRC support

document parseiptc()

BEFORE 0.48:

scale() fixes/docs, Imager::Transformations going over. (done)

do some more malloc checks (done)

scan $Config{libspath} for directories if we can. (done)

0.47:

- more documentation (and corresponding code cleanup)

- external C API access

- hooks for file reading/writing

- hooks for font types

- hooks for filters

- hooks for fills

- filter pre-processor for handling both image access methods

- move existing loadable filters into separate sub-directories

- write Imager::SDL

- maybe Imager::Tk::Photo


0.46: (September 2005)

- check remaining memory allocation calls for integer overflows
  http://rt.cpan.org/NoAuth/Bug.html?id=8213
   - check *alloc() calls
   - check llist_push() calls

- fix Imager::Color warning when $ENV{HOME} isn't set from
  _get_gimp_color() (done)
  http://rt.cpan.org/NoAuth/Bug.html?id=13143

- module version numbers (done)
  http://rt.cpan.org/NoAuth/Bug.html?id=13047

- allow limits to be set on the size of an image read from a file. This is
  to prevent an attacker supplying huge images that consume all of
  memory causing a denial of service attack. (done)

- implement gsamp()/gsampf()/plin() etc methods for those low level image
  interfaces which don't yet have methods. (done)
   - code (done)
   - test (done)
   - document (done)

- add Imager::Tutorial (see Tk::UserGuide for a structure) (done)
  don't cover installation - belongs in README or INSTALL
  it doesn't need to cover everything - read/write/create/simple drawing
  and simple text - other stuff belongs in the cookbook or in sample code

- rename lib/Imager/Cookbook.pm to lib/Imager/Cookbook.pod (done)

- add 5 more recipes to Imager::Cookbook

- implement i_incomplete for png and gif files.

- documentation audit, check:
  - every method has at least one example, but if the method is complex
    (like transform2, to_paletted, string() for example) it should include
    a range of examples
  - check each method description to ensure it's reasonably clear.
  - check POD sections (SEE ALSO in particular)
  - multiple examples for writing GIF images.
  - name arguments and use those names in the documentation
    http://nntp.perl.org/group/perl.perl5.porters/102434
  (#1521, #5608, #8231, #11429, #13058(done))

- have $img->read() act like ($img) = Imager->read_multi() on GIFs (done)

- figure out what the nearest_color filter does, and document it

- remove image.h dependency on t1lib.h (done)

- make sure dynfilt/Makefile.PL gets the same includes that
  Makefile.PL does.

0.47:

- rework handling of antialiasing and other transparency against
  transparent images

  Places to check:
   - text AA rendering
   - AA line drawing
   - anything that uses combine (fills in particular)
   - image scaling? and matrix_transform()'s interpolation
  http://rt.cpan.org/NoAuth/Bug.html?id=11972

0.48:

- fill out handling of large sample (16/double per sample) images
  - filters
  - rendering:
    - lines
    - text
    - boxes
    - polygons
  - engines
    - matrix transform
    - transform()
    - transform2()
  - files:
    - png
    - tiff
    - pnm

Speculation
-----------

Some of what's listed below has been implemented.

- should i_incomplete be optional? ie. reading a short image results in
  an error unless the user requests incomplete images.

Iolayer:
- Add scalar/mmap to iolayer
- Add close() code to iolayer for fakeseek sources.
- Merge callback interface into iolayer
- and raw
- Implment the maxread threshold (Indicates how much can
  be read from a source before it stops reading from its
  underlying source. For making sure only the relevant
  data is read from a socket for example.

Enhanched internal structure:

MultiImage & metadata support:
- Figure what interface should be between C and perl?
- How to store data in the C interface for tags/metadata?
  Support tiff's madness, i.e. tags and options.
- Error handling, make a general i_errstr object and arrange
  such that each image has an i_errstr object to hold its
  local errors?
- SEE design/represent.txt for proposed new structure and
  interface design that takes these factors into account.
- define common i_* tags for specifying attribute common among images
  like spatial resolution (implement for other image types, especially
  TIFF) (Spatial resolution is supported for all types that support
  it - are there any other common properties we can add?)
- implement the i_incomplete tag for other formats

New Features:
- Add mng support, pcx and aalib support.
  - Windows icon files (.ico) (done)
  - ILBM (Amiga) images
  - photoshop files (I think I've seen docs)
  - XBM
  - FITS
  - WMF (extract bitmap data on read)
  - gzip or bzip2 compressed raw
  - postscript for output
  - PAM file support (man pam in recent PNM tools)

- Transforms, interpolated multidimensional lookup tables.
  Usefull for CMYK <-> RGB table lookup.

- advanced font layout (spacing, kerning, alignment) (Artur?)

- ways to check if characters are present in a font, eg. checking if
  ligatures are present (done for FreeType2)

- font synthesis - synthesize a bold or slanted font from a normal font
  (or even from an existing bold or slanted font)

- utf8 support for text output
  (available for FT1, freetype2, T1, Win32)

- easy interfaces for text output:
  - align text around point, including:
    - left, center, right horizontal alignment
    - top, center, baseline, bottom alignment
    - choose whether to base alignment upon character cells or font
      metrics to avoid spacing problems between lines
  - fill a box from text, with newline handling
    - an option to just return the information that would be used to
      output the text, so it can be used for sizing calculations
    - how much text fit in the box/how much space is left in the box
  - fill a box with rich text (size and font changes)
    - as above
    - wrapping around boxes/images
  - pod2Imager :)

- tools to get more information about fonts/characters:
  - name of font "Arial Bold Italic" vs "arialbi.ttf"
  - ABC widths for characters (currently the only way to get the C width
    for a character is to get the width with a following space and without
    and then compare)
  - character names

- encodings for text output (maybe using the Encode module to work
  between encodings)

- image rotation, 3 ways of doing rotation:
  - rotation by shearing, which produces makes lengths in the image larger,
    but could be useful
  (2 of the 3 have been done)

- read_multi() needs to handle other multi-image types,
   (handles TIFF and GIF)

- write_multi() to save other multi-image types, (handles TIFF and GIF)
  - pnm binary formats support multiple images per file

- compose channels - build a new image based on channels from several
  images

- arc outlines

- filled/outlined ellipses and elliptical arcs

  Complexities include:

  a) when drawing a pie segment, are the angles specified the real
  angles (since the scaling changes the angles if you just use sin() and
  cos() directly) or the angle before scaling? I can see cases where
  both are useful.

  b) can you control the angles of the axes of symmetry? (the axes would
  remain at right angles to each other) Does this change the effect of
  the d1 and d2 parameters?

- complex lines/curves:
  - thick lines:
    - dotted/dashed lines
    - doubled lines?
    - end-point controls (butt-end, square-end, round-end, pointy, arrows)
  - brush-lines (as with the Gimp, or Photoshop)
    - more complex with multiple strokes and various randomness as with
      Fractal Design Painter (or later versions of Corel Photo Paint)
  - complex line shapes:
    - lines
    - general curves (cubic or bezier, whichever is more general)
    - easy access to general curves:
      - points to make a nice curve from
      - various circular curves (centre, radii, start/end angles,
        direction)
  - Complex thick lines are probably more useful than brush-lines for
    the things I expect Imager to be used for.
  - http://www.develop-help.com/imager/strokes.png (.jpg for smaller version)

- have Imager::Color{::Float}? use Graphics::ColorNames if present.

Clean up:
- Make sure everything is doable with the OO interface
  i_flood_fill() for example.
  - include low-level functions like gsamp() and so on

- Compile with memory debugging enabled and fix all leaks

- Add mycalloc() memory allocation wrappers.

- should we overload <=> or cmp for Imager::Color objects?
  too many worms, leave it out

- should the interlace option for reading raw images have
  symbolic names in the OO interface?

- improve consistency in the interfaces, both in trying to use named
  parameters where possible but also in using consistent names, eg.
  (tx, ty) vs (left, top) in rubthrough() vs paste(). Do we want a (simple)
  standard for this (suggested names)? Remember to preserve the old
  interface where possible.

- try to clean up the inconsistencies between font types:
  - utf8 (even if we just treat characters over 0xFF as missing for T1)
    (done for FT2, FT1, T1)
  - transformations (done for FT2)
  - has_char() method (done for FT2, FT1, T1)

Format specific issues:
- provide patches for libgif and libungif that fix their bugs
  and give a useful extension interface. Probe for the
  installation of the patches in Makefile.PL to let gif.c
  know what features it can use. (no need anymore)

- Add options for pnm writer to save in any of the p1..P6
  formats. Even if the input has 1 channel, write 3 and such
  cases. Also allow ascii mode. Need to be able to write
  pbm images which needs ties to the quantization code.

- save paletted images as paletted where that's supported. Done
  for gif/tga/bmp/tiff. Not done for png yet.

- read other format paletted images as paletted images. This has
  been done for gif/tga/bmp/tiff formats but not for png.

- read/write 16-bit/sample images as such for tiff

- read more metadata from images, esp tiff tags, EXIF format information
  from TIFF and JPEG.

- handle 16-bit/sample pgm/ppm files (done)

- "jpeg lossless rotation" - directly manipulates the JPEG
  representation to rotate, scale or in some limited cases, crop an
  image.

Documentation:
- Add to the documentation
- Write a tutorial?
- sample code and Imager/Samples.pod describing them
- Imager/Cookbook.pod
- Write a guide to installing the helper libraries
- Go through the entire project and add comments in pod
  so doco.perl can be used to read them.
- see the IRC log in design/doclayout.txt
- method index?
- concept index?

Build/configure:
- use prompt() (from ExtUtils::MakeMaker) for questions in Makefile.PL
- use the library's mechanism's to find the library if needed, for
  example, freetype-config for FT2
- the freetype2 library is built as "freetype.lib" on Win32 and needs
  to be renamed to be found by the configuration process and included
  with -lfreetype. Try to work around that.
- freetype2 and freetype1 tend to be installed in /usr/include/freetype2
  and /usr/include/freetype directories, or similarly named (somedir/freetype
  for example), instead of putting these directly into the search path
  search for the freetype{2}?/someheader and then add the subdirectory if
  we find the file in that directory.
- switch to Test::More
- change headers to use more unique re-include protection macros

Old release checklists
----------------------

0.44: (december 2004)
- set i_format for every file type on read and test for it:
  - bmp - done
  - jpeg - done
  - tiff - done
  - tga - done
  - rgb - no read function anyway
  - png - done
  - gif - done
  - pnm - done
  - raw - done
- check each file reader for possible integer overflows
  - bmp - done
  - tiff
  - tga
  - rgb
  - png
  - gif
  - pnm
- check bmp code uses image data offset correctly - done
- check quant code for integer overflows - done
- check for old URLs (umich and imager.perl.org/~addi/...) - done

0.45: (march 2005?)
- resolve fills test failure under 5.8.6/darwin
  http://www.nntp.perl.org/group/perl.cpan.testers/202802
  add tests to check if the same problem occurs with other ?: operators
- stop tga_header_verify() from spewing junk to stdout (done)
- fix i_setcolors_p bug (done)
- audit pnm.c (done)
- audit tga.c (done)
- audit rgb.c and add tests
- add META.yml (bypass EU::MM's limited mechanism) (done)
- implement i_incomplete for bmp files
- check if freetype 2 is faster/slower than freetype 1 with Imager's glyph
  caching. If FT1 is faster, add caching as a TODO for FT2.
- add XS for i_tags_get_string() and test it. It has an apparent problem
  in C<< sprintf(value, "%d", entry->data); >> since data is a pointer
  (done)
- test and fix problem with fallback value for
  Imager::Font::BBox->advance_width. (done)
- check handling of string() method align parameter. (done, fixed)
- i_tt_bbox_inst in font.c uses variable i without ever setting it. (fixed)
- add sample CGI that handles an uploaded image (done)
- examples for fountain filter in Imager::Filters (done)
- allow Imager::Fountain to take color descriptions (eg. blue, FF000)
  instead of color objects for c0 and c1 (done)
- support newer GIMP gradient files with the Name line (done)
- provide access to right-side bearing information from the bounding box
  function (done for all drivers)
- capture TIFF read warnings (i_warnings tag?) (done)
- Imager::Matrix2d rotate method only applies offset if both x and y
  are non-zero, it should do it if either is non-zero (done)
- add Imager::Cookbook with at least 5 recipes (done)
- store floating point tags in an appropriate precision (done)
- allow image creation to fail on malloc() failure for the image data
  rather than aborting. The current behaviour could be a denial of
  service attack. This has limited utility because of the way memory
  over commitment works on Linux (done but reverted)
- eliminate unused variable warning (especially the RETVAL ones in Imager.xs)
  (done)
- handle probing for libraries better (use pkg-config or I<library>-config
  where possible (freetype2 and libpng)) (done)
- add concept index to Imager.pm pod (done, still working it)
- replace testimg/penguin-base.ppm with a smaller image (done)
- add a sample CGI HTML and image generation scripts that work together,
  with appropriate security management (done)

Something went wrong with that request. Please try again.