14 Sep 2006 11:16
Re: agg::renderer_base_pre VS agg::renderer_base
Stephan Assmus <superstippi <at> gmx.de>
2006-09-14 09:16:03 GMT
2006-09-14 09:16:03 GMT
Hi Dave, dave <at> groovbird.com wrote: [8<] > There are three ways of blending pixels: > - plain pixels to pre-multiplied pixels > - pre-multiplied pixels to pre-multiplied pixels > - plain pixels to plain pixels. [8<] you gave a very nice explaination. I'd like to add that whenever bitmap data is processed which contains transparent pixels, you absolutely _need_ to have this bitmap converted to premultiplied format to be able to filter it in any way. Otherwise the semi transparent pixels will have wrong weighting (too much influence), or you need to compensate this in your filters (much more processing!). All the filters in AGG are written in a way that they only work correctly with pre-multiplied image data. When you retrieve your bitmap data from a file, you need to know wether the image data is already pre-multiplied or not. For example, PNGs should not be pre-multiplied while in TIFFs, it can be either way. In AGG 2.4, most pixel_format classes have a function to pre-mutliply the whole rendering buffer. Best regards, -Stephan ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
RSS Feed