diff options
author | Kalev Lember <kalevlember@gmail.com> | 2015-03-25 17:20:26 +0100 |
---|---|---|
committer | Kalev Lember <kalevlember@gmail.com> | 2015-03-25 17:39:50 +0100 |
commit | 9f0258ecbf740e226ab69f4ee5fd12d88c380c64 (patch) | |
tree | 2b9a5750a170f3e4282bea4383250036f9d5c3ee | |
parent | 0e3e1e184c5d13464eef1dd5f2017bca9644f5da (diff) | |
download | appstream-glib-9f0258ecbf740e226ab69f4ee5fd12d88c380c64.tar.gz |
Always upscale screenshots if they are too small
After discussing screenshot scaling with jimmac, the designer guidance
was that slightly blurry, upscaled images look better than unscaled
images that have uneven weird borders.
-rw-r--r-- | libappstream-glib/as-image.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/libappstream-glib/as-image.c b/libappstream-glib/as-image.c index e47ed90..401b5f5 100644 --- a/libappstream-glib/as-image.c +++ b/libappstream-glib/as-image.c @@ -567,21 +567,6 @@ as_image_save_pixbuf (AsImage *image, if (width == pixbuf_width && height == pixbuf_height) return g_object_ref (priv->pixbuf); - /* never scale up, just pad */ - if (pixbuf_width < width && pixbuf_height < height && - (flags & AS_IMAGE_SAVE_FLAG_BLUR) == 0) { - pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, - TRUE, 8, width, height); - gdk_pixbuf_fill (pixbuf, 0x00000000); - gdk_pixbuf_copy_area (priv->pixbuf, - 0, 0, /* of src */ - pixbuf_width, pixbuf_height, - pixbuf, - (width - pixbuf_width) / 2, - (height - pixbuf_height) / 2); - return pixbuf; - } - /* is the aspect ratio of the source perfectly 16:9 */ if (flags == AS_IMAGE_SAVE_FLAG_NONE || (pixbuf_width / 16) * 9 == pixbuf_height) { |