30-bit displaying with Krita?
Boudewijn Rempt
boud at valdyas.org
Wed Dec 23 16:02:47 CET 2009
On Wed, 23 Dec 2009, Kai-Uwe Behrmann wrote:
> In Krita 2.0.2 on xf86_64 Linux image displaying appears to be limited to
> 8-bit per channel even with OpenGL switched on. The source material
> is a 16-bit/3-channels gray gradient Tiff file. But the display output
> looks like 8-bit. Kritas colour picker shows fine differences on a pixel
> level. So loading appears to be correct. However the Krita display showes
> lesser differences. Does Krita display its data in OpenGL as
> GL_RGB16/GL_UNSIGNED_SHORT?
>
> Any otheridea why Krita gives only 8-bit output?
>
Adrian Page is the person who can answer this most authoritatively, but I think
that Krita always uses 8 bits rgb textures, unless the colorspace is RGBAF16HALF,
and I think that that colorspace has been removed in favour of the openctl-based
colorspaces, so the following lines in Krita are in error:
./krita/ui/opengl/kis_opengl_image_textures.cpp: if (m_image->colorSpace()->id() == "RGBAF16HALF") {
./krita/ui/opengl/kis_opengl_image_textures.cpp: if (colorSpaceId == "RGBAF16HALF") {
./krita/ui/opengl/kis_opengl_image_textures.cpp: if (colorSpaceId == "RGBAF16HALF") {
./krita/plugins/formats/tiff/kis_tiff_writer_visitor.cpp: if (KoID(cs->id()) == KoID("RGBAF16HALF") || KoID(cs->id()) == KoID("RGBAF32"))
16 bits integer colorspaces are downsampled to 8 bits for display in opengl as well.
I never realized this issue, maybe because I only have laptops and those have very
crappy displays :-(.
> In my tests a small test OpenGL viewer shows the rendering in 30-bit
> display mode ("RGB weight 101010") different from Krita and very smooth as
> expected.
The relevant code is in krita/ui/opengl and definitely needs a bit of maintenance.
Boudewijn
More information about the kimageshop
mailing list