After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 314742 - saving PNG as JPG produces garbled image.
saving PNG as JPG produces garbled image.
Status: RESOLVED FIXED
Product: eog
Classification: Core
Component: general
2.10.x
Other Linux
: Normal normal
: ---
Assigned To: EOG Maintainers
EOG Maintainers
: 320155 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2005-08-28 23:51 UTC by David Schroeder
Modified: 2005-10-29 23:20 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10


Attachments
tarball of the source PNG and the resulting JPEG (384.81 KB, application/x-compressed-tar)
2005-08-28 23:57 UTC, David Schroeder
  Details
patch fixing RGBA->RGB conversion (698 bytes, patch)
2005-10-22 12:01 UTC, Felix Riemann
none Details | Review

Description David Schroeder 2005-08-28 23:51:17 UTC
Distribution/Version: ubuntu hoary

I took a capture of a window using ALT+PrintScr, and saved it as a PNG. I then
opened that image up in EOG and saved it as a jpeg. The image was messed up. I
will attach the PNG and resulting JPEG
Comment 1 David Schroeder 2005-08-28 23:57:04 UTC
Created attachment 51487 [details]
tarball of the source PNG and the resulting JPEG
Comment 2 Felix Riemann 2005-10-18 19:58:55 UTC
This seems to be a problem with images containing an alpha channel.
It works if you use 8-bit PNGs or a PNG without alpha channel.
Comment 3 Felix Riemann 2005-10-22 12:01:20 UTC
Created attachment 53760 [details] [review]
patch fixing RGBA->RGB conversion

This patch should fix it. The problem was that the loop converting the RGBA
data to RGB data always skipped 3 bytes when advancing to the next pixel. RGBA
data is 4 pixels wide though.
The patch changes the loop so it calculates the size of a pixels data through
the rowstride and the images width.
Comment 4 Lucas Rocha 2005-10-23 02:14:26 UTC
Applied, thanks!
Comment 5 Lucas Rocha 2005-10-29 23:20:31 UTC
*** Bug 320155 has been marked as a duplicate of this bug. ***