GNOME Bugzilla – Bug 672432
Thumbnails for transparent images are shown without a black border
Last modified: 2021-06-18 15:50:30 UTC
Original Report: https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/959743 DistroRelease: Ubuntu 11.10 Package: nautilus 1:3.2.1-0ubuntu4.2 "See the screenshot (https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/959743/+attachment/2900089/+files/Screenshot%20at%202012-03-19%2022%3A39%3A34.png). Some image thumbnails are shown with a border, some are not. I guess having or not having a frame is a matter of tastes, I can't tell which is better, but there's no reason why some images should have a frame and some should not. Note that some of the tiff images in the screenshot have a border, some don't, so it's not the image format. Also, all the tiffs shown have an alpha channel and all of them have a transparent background, but still some of them have a border and some don't. I've seen a few bugs reports about thumbnails having or not having a frame, but they either don't mention the coexistence of images with and withoit frame or are marked as fixed."
The title of my original report is more accurate: some image thumbnails are shown with a black border, some are not
nautilus_ui_frame_image() has: /* We don't want frames around small icons */ if (size < 128 && gdk_pixbuf_get_has_alpha (*pixbuf)) { return; }
This was added in: commit 2a94803b44010e3c47a9f7b94894fab8d6062abc Author: Jaap A. Haitsma <jaap@haitsma.org> Date: Sat Jul 18 20:45:05 2009 +0200 Fix handling of small images/icons Small images with an alpha plane don't get a frame Use different scaling strategy for small images. Small images/icons won't get up scaled in default zoom view. They are shown in their actual Fixes bug #585186
I think a better logic to solve this could be: - always make the frame be square and using the given icon size - whenever the icon is smaller than the thumbnail frame in each direction, render it centered in the frame space - always frame all icons
Sounds good to me.
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version of Files (nautilus), then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME/nautilus/-/issues/ Thank you for your understanding and your help.