Hi Lorne,
> Can you convert the images to RGB colorspace when they're loaded? Or
> do you need to remain in their colorspace during processing?
Yes. I am implementing an API which offers to store and use images in different format. Since there are no functions to directly access image data, but only for importing/exporting data, I could possibly fake the whole thing and pretend to be storing images in the requested format while I really only have one internal format. But I am guessing the whole point of offering different color spaces is to keep the memory requirements in check, so I better honor the requested formats.
> I haven't done anything like this yet, but I'm planning to do an
> on-the-fly RGB to HSL conversion for a colorizing filter I'd like to
> implement. I wasn't planning on implementing a full pixel format for
> it though -- just doing RGB to HSL and back during the lifetime of the
> effect. I don't know if that will perform satisfactorily yet though; I
> may need to implement a more generalized convertor, and "cache" the
> HSL version so the conversions could be minimized. I'd be happy to
> share any code I come up with when I get to that point.
>
> I wonder if it could be done using an adaptor, sort of along the lines
> of agg_pixfmt_amask_adaptor.h or agg_pixfmt_transposer.h?
I looked at agg_pixfmt_transposer.h, but that seems to be for changing the attached buffer at runtime only (because later classes in the pipeline take references to pixel format objects, which cannot be changed once intantiated).
But I'll take another look at agg_pixfmt_amask_adaptor.h.
> What colorspaces do you need to convert from?
Oh, these are different ones... 16 bit RGB spaces with and without differently sized alpha channels and 32 bit RGB with different channel order and all that multiplied with linear and sRGB versions. As well as luminance, grayscale images and even black and white bitmaps. :-)
Best regards,
-Stephan
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/_______________________________________________
Vector-agg-general mailing list
Vector-agg-general@...
https://lists.sourceforge.net/lists/listinfo/vector-agg-general