Transparency in Index8 QImage
-
I've got grayscale image data coming from a streaming firewire camera for a scientific application. I'm trying to overlay images with one another in a widget. I've created a 256 gray level colormap for the indexed image, etc. I can draw them just fine in the paintEvent method of the widget.
Is there an easy way to easily set the alpha blending for the whole image so that I can see through the image to whatever is behind?
I'm trying to allow the user to stitch images from side-by-side cameras visually.
Thoughts?
-
I have a follow on question about data sharing and a QImage.
If I create the QImage from a pointer to a unsigned char in memory (and a width and height argument), is it possible to change the pointer withing deleting and re-creating the QImage? Data sharing seems to say that it doesn't copy the data until you try to write to it (which I won't do).
I have a circular frame buffer of images that are being filled by the camera. In my paintevent method, i'm currently creating and destroying qimages.. Would it be faster to re-assign the memory location to the image data? Is that possible once the qimage has been created?
I'm new to the use of this data structure and want to make sure I'm using it as intended.
Thanks!