Alpha channels are supported as long as the image is not using premultiplied alpha. To get alpha channel make sure to include cmsFLAGS_COPY_ALPHA in the flags field. This is explained in LittleCMS documentation.
So, try: toDisplay = colorManage(sourceImage, profiles, INTENT_PERCEPTUAL, cmsFLAGS_COPY_ALPHA);*
Are you saying that if you take another 2000*1500 png file it works without any issues but as soon
as you use "that" image, it will crash ?
Does it contains transparent areas or what makes it special ?
@JonB Not a big viewer at all. viewer is a simple QGraphicsView containing a QPixmapItem which is continually updated through another slot taking a signal from the camera thread every time it has a new frame, at 60fps.
Part of the issue seems to be with the debug build, which is obviously a fair bit slower than release. In release it doesn't really seem noticeable, though I imagine it might be on a slow system. Still, I do find the asynchronous behaviour of raise() interesting. I tried looking a bit at the source code, but didn't really get anywhere. Because it's not a problem in release, I guess I'll just leave it be for now. Thanks for the help, though, much appreciated.
(The vec4 can hold "rgba" values if that's what you put in it - the example there just calls it "xyzw" because the data type generically handles any 4 floats.)
Basically, start from an example that draws an image with a simple glsl shader as a texture. Then hack on the shader until it flips around the colors like you want when it draws the texture. Then use your code that gets the image over the network to upload the image as the OpenGL texture every frame.