Hi, Here are questions about the java2d pipeline to understand how colors are handled as pixel values (conversions): - BufferedImage use by default the sRGB colorspace (non linear) so its raster data (RGBA) are encoded as int values (sRGB).
What parts of the java2d pipeline handle color blending in linear RGB (quality issue) ? AlphaComposite impl (ogl, xr) .... like the SrcOver operator. Blit ? The Javadoc explains conversions between premultiplied alpha images... but nothing about the colorspace of pixels. Is it supposed to be always sRGB = the java native color space ? So the complete pipeline should deal with gamma correction at every color blending stage... - if I create a BufferedImage with the CS_LINEAR_RGB colorspace (RGBA values), I expected the image to have better quality but the final PNG image remains the same. Conversion into sRGB happened at some stage or the PNG encoder is buggy ? - Is it possible to implement a custom MaskBlit / MaskFill in java ? Or I must fix the C implementations dealing with all possible pixel formats (rgb, rgba, rgb555 ....) in every pipeline (software, opengl, xrender, direct3d...) - how could I use an alternative colorspace (cie-lch for example) with the current pipelines to make color blending in this perfect colorspace and convert the final image back to sRGB ? Thanks for your feedback, Laurent
