Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
4.7.0, 5.2.1
-
None
-
Debian Jessie
-
0226795cf33363a872c777034e0d8934ffaa3819
Description
When I save QPixmap as a stream to some file and then loads it from the file, alpha channel distorts. It is especially visible when image has a regions with variable alpha channel values.
Next steps must be taken to reproduce a problem:
1. load some image with alpha channel to QPixmap;
2. save it as a stream to some file;
3. load it from a file stream to QPixmap object;
4. repeat steps 2-3 one to thousand times;
5. save latest QPixmap as image again;
6. compare initial and resulted images, specificially alpha channel.
Relevant code looks like this: http://pastebin.com/MZKWMeA9
I also created a github repo to run example faster, it has image example in README: https://github.com/JIghtuse/qt-image-bug
Another image examples attached to this report (logo0.png - original image, logo1000.png - image after 1000 iterations of load/store as a stream, logo_diff.png - diff image generated by ImageMagic's compare tool).