/** * gs_screenshot_image_show_blurred: **/ static void gs_screenshot_image_show_blurred (GsScreenshotImage *ssimg, const gchar *filename_thumb) { GsScreenshotImagePrivate *priv; _cleanup_object_unref_ AsImage *im = NULL; _cleanup_object_unref_ GdkPixbuf *pb = NULL; priv = gs_screenshot_image_get_instance_private (ssimg); /* create an helper which can do the blurring for us */ im = as_image_new (); if (!as_image_load_filename (im, filename_thumb, NULL)) return; pb = as_image_save_pixbuf (im, priv->width * priv->scale, priv->height * priv->scale, AS_IMAGE_SAVE_FLAG_BLUR); if (pb == NULL) return; if (g_strcmp0 (priv->current_image, "image1") == 0) { gs_image_set_from_pixbuf_with_scale (GTK_IMAGE (priv->image1), pb, priv->scale); } else { gs_image_set_from_pixbuf_with_scale (GTK_IMAGE (priv->image2), pb, priv->scale); } }
static void gs_screenshot_image_show_blurred (GsScreenshotImage *ssimg, const gchar *filename_thumb) { g_autoptr(AsImage) im = NULL; g_autoptr(GdkPixbuf) pb = NULL; /* create an helper which can do the blurring for us */ im = as_image_new (); if (!as_image_load_filename (im, filename_thumb, NULL)) return; pb = as_image_save_pixbuf (im, ssimg->width * ssimg->scale, ssimg->height * ssimg->scale, AS_IMAGE_SAVE_FLAG_BLUR); if (pb == NULL) return; if (g_strcmp0 (ssimg->current_image, "image1") == 0) { gs_image_set_from_pixbuf_with_scale (GTK_IMAGE (ssimg->image1), pb, (gint) ssimg->scale); } else { gs_image_set_from_pixbuf_with_scale (GTK_IMAGE (ssimg->image2), pb, (gint) ssimg->scale); } }