commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Damjan Jovanovic <>
Subject [sanselan] Multi-image files and API changes
Date Wed, 17 Nov 2010 08:45:49 GMT

I've noticed a number of problems with Sanselan's API:

1. There is a way to read files with multiple images
(Sanselan.getAllBufferedImages()) but there is no way to write files
with multiple images. This limits the usability of all multi-image
file formats.
2. There needs to be a way to configure writing better (for example,
the purpose of the different images in multi-image formats is often to
store different color depths in one icon file, so there should be a
way to configure what depth each image gets written in).
3. There is heavy confusion between per-image info (eg. width, height,
bpp) and per-file info (format, MIME type, number of images in total)
in the ImageInfo class. getImageSize() also doesn't fit multi-image
formats - which image's size is being queried?

Microsoft's Windows Imaging Component solved the problem by having an
IWICBitmapDecoder, with methods GetFrameCount() and GetFrame(index)
The bitmap decoder can be queried for properties of the entire image
file, while each frame can be queried for properties of that
individual image.

Sun's javax.imageio has something similar.

How much can I refactor Sanselan's classes? Does any backward
compatibility need to be maintained (since it's not at version 1.0

Thank you

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message