> On Jul 14, 2011, at 7:05 AM, jeronimo wrote:
>> I  would like to read exr files with linear color space. For that I'm using
>> OIIO but my viewer(Qt's QGraphicsView) shows the picture with sRGB color
>> space.

This is interesting to me because I'm currently updating a framebuffer
application from fltk to qt.  I don't know much about colour spaces though;
what's the reason that the images should be in sRGB?  Is it just that Qt is
completely ignorant of colour spaces and most uncalibrated monitors happen to
give roughly the right result if you throw sRGB at them?

On Fri, Jul 15, 2011 at 3:18 AM, Larry Gritz <[email protected]> wrote:
> That is still fairly inefficient -- I bet that there's a way to set an entire
> scanline (or image) at once, without having to call setPixel separately for
> every pixel, that's going to be very slow.

Yeah.  Check out QImage::scanLine(), which lets you get at a buffer containing
an entire row of pixels.  QImage::bits() also gives access to the raw bits,
though there might be a nontrivial row stride (see QImage::bytesPerLine()).

> So here's an important question: does qRgb expect those floating-point values
> to be in the 0.0-1.0 range?

AFAIK it expects ints with an 8-bit range, so better cast and clamp those
values correctly :)

~Chris
_______________________________________________
Oiio-dev mailing list
[email protected]
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

Reply via email to