Patch by: Diego Escalante Urrelo <diego@aureal.com.pe>
2007-02-25 Jens Granseuer <jensgr@gmx.net> Patch by: Diego Escalante Urrelo <diego@aureal.com.pe> * e-image-chooser.c: (set_image_from_data): don't use a composite pixbuf, avoiding some unnecessary clipping (fixes bug #380315) svn path=/trunk/; revision=7335
This commit is contained in:
parent
11c36bd11a
commit
f85d110b1f
2 changed files with 8 additions and 13 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2007-02-25 Jens Granseuer <jensgr@gmx.net>
|
||||||
|
|
||||||
|
Patch by: Diego Escalante Urrelo <diego@aureal.com.pe>
|
||||||
|
|
||||||
|
* e-image-chooser.c: (set_image_from_data): don't use a composite
|
||||||
|
pixbuf, avoiding some unnecessary clipping (fixes bug #380315)
|
||||||
|
|
||||||
2007-02-25 Jens Granseuer <jensgr@gmx.net>
|
2007-02-25 Jens Granseuer <jensgr@gmx.net>
|
||||||
|
|
||||||
* Makefile.am:
|
* Makefile.am:
|
||||||
|
|
|
@ -218,7 +218,6 @@ set_image_from_data (EImageChooser *chooser,
|
||||||
|
|
||||||
if (pixbuf) {
|
if (pixbuf) {
|
||||||
GdkPixbuf *scaled;
|
GdkPixbuf *scaled;
|
||||||
GdkPixbuf *composite;
|
|
||||||
|
|
||||||
float scale;
|
float scale;
|
||||||
int new_height, new_width;
|
int new_height, new_width;
|
||||||
|
@ -262,19 +261,8 @@ set_image_from_data (EImageChooser *chooser,
|
||||||
new_width, new_height,
|
new_width, new_height,
|
||||||
GDK_INTERP_BILINEAR);
|
GDK_INTERP_BILINEAR);
|
||||||
|
|
||||||
composite = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, gdk_pixbuf_get_bits_per_sample (pixbuf),
|
gtk_image_set_from_pixbuf (GTK_IMAGE (chooser->priv->image), scaled);
|
||||||
chooser->priv->image_width, chooser->priv->image_height);
|
|
||||||
|
|
||||||
gdk_pixbuf_fill (composite, 0x00000000);
|
|
||||||
|
|
||||||
gdk_pixbuf_copy_area (scaled, 0, 0, new_width, new_height,
|
|
||||||
composite,
|
|
||||||
chooser->priv->image_width / 2 - new_width / 2,
|
|
||||||
chooser->priv->image_height / 2 - new_height / 2);
|
|
||||||
|
|
||||||
gtk_image_set_from_pixbuf (GTK_IMAGE (chooser->priv->image), composite);
|
|
||||||
g_object_unref (scaled);
|
g_object_unref (scaled);
|
||||||
g_object_unref (composite);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
g_object_unref (pixbuf);
|
g_object_unref (pixbuf);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue