[gimp] Bug 785138: .GIH brushes and reference displacement...
- From: Jehan Pagès <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Bug 785138: .GIH brushes and reference displacement...
- Date: Fri, 12 Jan 2018 00:00:43 +0000 (UTC)
commit 5db03953c00da4cb353be38f87913580ff51e0be
Author: Massimo Valentini <mvalentini src gnome org>
Date: Thu Jan 11 08:51:08 2018 +0100
Bug 785138: .GIH brushes and reference displacement...
...when them have layers with different sizes
properly center smaller brushes loading gih files
and always NUL terminate brushes name
plug-ins/common/file-gih.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/plug-ins/common/file-gih.c b/plug-ins/common/file-gih.c
index cbe990f..5c0250e 100644
--- a/plug-ins/common/file-gih.c
+++ b/plug-ins/common/file-gih.c
@@ -493,7 +493,7 @@ gih_load_one_brush (GInputStream *input,
if ((size = (bh.header_size - sizeof (bh))) > 0)
{
- name = g_new (gchar, size);
+ name = g_new0 (gchar, size + 1);
if (! g_input_stream_read_all (input, name, size,
&bytes_read, NULL, error) ||
@@ -622,7 +622,7 @@ gih_load_one_brush (GInputStream *input,
new_height = MAX (height, bh.height);
gimp_image_resize (image_ID,
new_width, new_height,
- (width - new_width) / 2, (height - new_height) / 2);
+ (new_width - width) / 2, (new_height - height) / 2);
}
layer_ID = gimp_layer_new (image_ID, name,
@@ -1197,7 +1197,7 @@ gih_save_one_brush (GOutputStream *output,
guchar *data;
GimpImageType drawable_type;
gint bpp;
- guint y;
+ gint y;
buffer = gimp_drawable_get_buffer (drawable_ID);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]