|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
AGG Drawing on Planar BufferI'm trying to use AGG to draw on a image buffer where the RGB values
are stored as: "r1,r2,r3, g1,g2,g3, b1,b2,b3, ..." (Planar) instead of: "r1,g1,b1, r2,g2,b2, ..." (Interleaved). I remember reading a while back that AGG could be made to do this using grayscale formats, but I can't find any details on this. Anyone can give me an idea how to do this? Thanks -- - Nick - ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ Vector-agg-general mailing list Vector-agg-general@... https://lists.sourceforge.net/lists/listinfo/vector-agg-general |
|
|
Re: AGG Drawing on Planar BufferOn 2009-06-18 at 16:25:50 [+0200], NickMtl <valerianmusic@...> wrote: > I'm trying to use AGG to draw on a image buffer where the RGB values are > stored as: > > "r1,r2,r3, g1,g2,g3, b1,b2,b3, ..." (Planar) > > instead of: > > "r1,g1,b1, r2,g2,b2, ..." (Interleaved). > > I remember reading a while back that AGG could be made to do this using > grayscale formats, but I can't find any details on this. > > Anyone can give me an idea how to do this? IIRC, the RGB blending operations indeed rely on interleaved image data. All the code I have seen gets a pointer to a pixel at a certain offset and then assumes interleaved data, offsets depend on ordertype. So you have two options: 1) Use three individual buffers of "agg::pixfmt_alpha_blend_gray" with "Step" and "Offset" according to your needs (I guess at least Step will remain 1). And then do any rendering three times. You would probably also have to separate the input colors accordingly. :-\ 2) Duplicate the RGB pixel format implementation that matches the features you need, and change all the code that refers to order_type and accesses color channels using that, and make these places use offsets which are settable members of the object. The increments for pixels will also be different (i.e. just 1 instead of 4 and so on). Another option is to change the code so that it uses three or four different agg::rendering_buffers for each channel. I think option 2 will be much better, since you should be able to use everything else as before, except for image filters/accessors, I would guess. Best regards, -Stephan ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ Vector-agg-general mailing list Vector-agg-general@... https://lists.sourceforge.net/lists/listinfo/vector-agg-general |
|
|
Re: AGG Drawing on Planar BufferThanks for the suggestions. I did retrieve the sample rendering one
component plane at a time: http://www.antigrain.com/demo/component_rendering.cpp.html I'll try to insert this technique into my existing code and see if it works and is efficient enough for real-time use. Thanks, -- - Nick - ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ Vector-agg-general mailing list Vector-agg-general@... https://lists.sourceforge.net/lists/listinfo/vector-agg-general |
| Free embeddable forum powered by Nabble | Forum Help |