gimp r26905 - in trunk: . plug-ins/file-psd
- From: neo svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r26905 - in trunk: . plug-ins/file-psd
- Date: Tue, 9 Sep 2008 08:01:49 +0000 (UTC)
Author: neo
Date: Tue Sep 9 08:01:49 2008
New Revision: 26905
URL: http://svn.gnome.org/viewvc/gimp?rev=26905&view=rev
Log:
2008-09-09 Sven Neumann <sven gimp org>
* plug-ins/file-psd/psd-save.c (create_merged_image): don't leak
the GimpDrawable.
Modified:
trunk/ChangeLog
trunk/plug-ins/file-psd/psd-save.c
Modified: trunk/plug-ins/file-psd/psd-save.c
==============================================================================
--- trunk/plug-ins/file-psd/psd-save.c (original)
+++ trunk/plug-ins/file-psd/psd-save.c Tue Sep 9 08:01:49 2008
@@ -1486,21 +1486,19 @@
static gint32
create_merged_image (gint32 image_id)
{
- gint32 merged_layer;
+ gint32 projection;
- merged_layer = gimp_layer_new_from_visible (image_id, image_id, SAVE_PROC);
+ projection = gimp_layer_new_from_visible (image_id, image_id, SAVE_PROC);
if (gimp_image_base_type (image_id) != GIMP_INDEXED)
{
+ GimpDrawable *drawable = gimp_drawable_get (projection);
GimpPixelRgn region;
gboolean transparency_found = FALSE;
gpointer pr;
- gimp_pixel_rgn_init (®ion,
- gimp_drawable_get (merged_layer),
- 0, 0,
- gimp_image_width (image_id),
- gimp_image_height (image_id),
+ gimp_pixel_rgn_init (®ion, drawable,
+ 0, 0, drawable->width, drawable->height,
TRUE, FALSE);
for (pr = gimp_pixel_rgns_register (1, ®ion);
@@ -1537,11 +1535,13 @@
}
}
+ gimp_drawable_detach (drawable);
+
if (! transparency_found)
- gimp_layer_flatten (merged_layer);
+ gimp_layer_flatten (projection);
}
- return merged_layer;
+ return projection;
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]