Boost logo

Boost :

Subject: Re: [boost] [gil] New IO release
From: Domagoj Saric (domagoj.saric_at_[hidden])
Date: 2010-10-11 11:03:34

"Phil Endecott" <spam_from_boost_dev_at_[hidden]> wrote in message

A quick answer ;)

> I've had a quick look at your libjpeg interface. Two features that I
> often use are dct_method=JDCT_IFAST and scaling down 2x or 4x using
> scale_num and scale_denom. It would be interesting to know whether (a)
> your existing code lets me use these via a "native handle", or (b) they
> could be added easily.

Well, w/o trying, I think you should be able to do it straight away with
option a:

gil::libjpeg_image::reader_for<...>::type your_image( ... );
your_image.lib_object().dct_method = JDCT_IFAST;
your_image.lib_object().scale_num = your_scale_num;

> My preference would still be to have a thinner library-wrapping layer,
> i.e. just a C++ification of the C library interface (see e.g.
> for an incomplete example), underneath
> the gil interface.

To tell you the truth, after looking at these uber-ugly C libraries (LibX -
JPEG, PNG and TIFF) from within and without for such a long time I'm hard
pressed not to conclude that the only proper thing to do is to finally
rewrite them in proper C++...considering all the time already spent trying
to wrap them and hide and 'normalize' their interfaces this might not be
such a crazy idea :-D

"What Huxley teaches is that in the age of advanced technology, spiritual
devastation is more likely to come from an enemy with a smiling face than
from one whose countenance exudes suspicion and hate."
Neil Postman 

Boost list run by bdawes at, gregod at, cpdaniel at, john at