+/**
+ * gtk_image_set_from_resource:
+ * @image: a #GtkImage
+ * @resource_path: (allow-none): a resource path or %NULL
+ *
+ * See gtk_image_new_from_resource() for details.
+ **/
+void
+gtk_image_set_from_resource (GtkImage *image,
+ const gchar *resource_path)
+{
+ GtkImagePrivate *priv;
+ GdkPixbufAnimation *animation;
+
+ g_return_if_fail (GTK_IS_IMAGE (image));
+
+ priv = image->priv;
+
+ g_object_freeze_notify (G_OBJECT (image));
+
+ gtk_image_clear (image);
+
+ if (resource_path == NULL)
+ {
+ g_object_thaw_notify (G_OBJECT (image));
+ return;
+ }
+
+ animation = gdk_pixbuf_animation_new_from_resource (resource_path, NULL);
+
+ if (animation == NULL)
+ {
+ gtk_image_set_from_stock (image,
+ GTK_STOCK_MISSING_IMAGE,
+ DEFAULT_ICON_SIZE);
+ g_object_thaw_notify (G_OBJECT (image));
+ return;
+ }
+
+ priv->resource_path = g_strdup (resource_path);
+
+ if (gdk_pixbuf_animation_is_static_image (animation))
+ gtk_image_set_from_pixbuf (image, gdk_pixbuf_animation_get_static_image (animation));
+ else
+ gtk_image_set_from_animation (image, animation);
+
+ g_object_notify (G_OBJECT (image), "resource");
+
+ g_object_unref (animation);
+
+ g_object_thaw_notify (G_OBJECT (image));
+}
+
+