Revision 8b2e921...
Go back to digest for 4th December 2011Features in Graphics
Provide methods to remove an alpha channel from an image. Remove alpha channel before saving to JPEG.
- hasTransparentPixels checks if, given there is an alpha channel,
some pixels actually is transparent (alpha < 1.0)
- bitBlendImageOnColor allows to compose an image over a constant color
This is equivalent to create a DImg, fill it with a color,
blend the first image over the new one, and replace the first image with the result.
- removeAlphaChannel blends the image on a color, usually, white, and removes the alpha channel
- in updateMetadata:
ensure that the previous embedded preview is always removed
only add a new check that a preview is only added if the original image is significantly
larger than the intended preview size
To be discussed and currently unchanged: handling of transparent pixels
File Changes
- /dimg
- libs.cpp
- libs.h