GNOME Bugzilla – Bug 509880
artdisplay-plugin does not preserve alpha-channel of image
Last modified: 2008-01-24 13:04:23 UTC
When drag&drop-ing a PNG with alpha-channel on the artdisplay-widget in rb the alpha-channel is not preserved and saved on harddisk. That's due to artdisplay only saving cover-images as JPG, which does not support an alpha-channel. Example (right after drag&drop): http://macslow.thepimp.net/shots/sparkle-2.png Example (after restart of rb): http://macslow.thepimp.net/shots/sparkle-3.png A possible solution would be to extend artdisplay in a way to save images with an alpha-channel as PNG by default.
Created attachment 103071 [details] [review] fix to make artdisplay preserve an images alpha-channel if present The patch checks if a pixbuf to save has an alpha-channel. If it does the file will be saved as PNG with the .png extension and a compression of 9. In case there is no alpha-channel it is saved as JPG with the .jpg extension and a quality of 100 (that just as it was before). When an image is about to be loaded from harddisk it is checked (via extension) if it is a .png or .jpg.
Committed to svn. Thanks for the patch.