
Hi there, over the past few months I have been working on a new
version of gil's io extension. In this release I've added support for:
* more image formats, most importantly bit_aligned images ( like 1bit images ),
* reading of subimages like one row at a time for huge images,
* reading image information, only.
* having a unified interface for all sorts of devices, subimages, and
converter objects.
So far, png, jpeg, and tiff images are supported. In the not so
distant future there will be bmp and pnm images added.
You can grab the current version via subversion from:
https://gil-contributions.googlecode.com/svn/trunk/gil_2/boost/gil/extension...
If desired I can supply a zip file to the vault.
The images libraries can be grabbed from:
ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz ( www.ijg.org isn't
responding )
http://www.libpng.org/pub/png/libpng.html
http://www.libtiff.org/
It's highly advised to built your own version of the image lib you
need. I installed the GNU's binaries for Windows, but unfortunately, I
only had problems with them.
The library is still header-only. When using boost::filesystem's
paths, of course, you add a dependency to the filesystem lib.
The Read Interface
------------------------
Reading an image can be done in multiple ways depending on what your
need is. Like the old io lib there are 4 different ways of reading
images. As there are:
* read_image: Read image, the right amount of memory will be allocated
beforehand. The supplied image type needs to be compatible with actual
image file.
* read_view: Read image, the image's memory must be already allocated.
The supplied image type needs to be compatible with actual image
file.
* read_and_convert_image: Same as read_image, but the user can specify
an color converter.
* read_and_convert_view: Same as read_view, but the user can specify
an color converter.
There is a new function for reading image information. Since every
image format has it's own set of tags, the library defines seperate
image_read_info

Christian Hennig wrote:
Hi there, over the past few months I have been working on a new version of gil's io extension. In this release I've added support for:
* more image formats, most importantly bit_aligned images ( like 1bit images ), * reading of subimages like one row at a time for huge images, * reading image information, only. * having a unified interface for all sorts of devices, subimages, and converter objects.
Thanks for great extension! Why do you take the top-left corner and size as a parameter to read_image? Why not just use read_view? -- John

Christian wrote:
I know there is still some work to do before a possible review. Documentation is lacking and support for dynamic image needs to be added. But what I want for now is to get some feedback on design and implementation.
When you do add support for this, perhaps you can address this issue:
What I would like is a way to read_and_convert to an any_image class, so
that the 'best' conversion from the file data to the format of one of my
image types is chosen.
For hypothetical example, if the file would optimally choose a gray16
planar image, but I pass any_image
participants (2)
-
Christian Henning
-
John Femiani