[gimp] app: also fix the calls to xcf_read,write-component()



commit 8f3cee424194605af823d3d86dec8e04445d8226
Author: Michael Natterer <mitch gimp org>
Date:   Sun Oct 1 17:43:10 2017 +0200

    app: also fix the calls to xcf_read,write-component()

 app/xcf/xcf-load.c |    2 +-
 app/xcf/xcf-save.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/app/xcf/xcf-load.c b/app/xcf/xcf-load.c
index 2a793c2..c820c50 100644
--- a/app/xcf/xcf-load.c
+++ b/app/xcf/xcf-load.c
@@ -2061,7 +2061,7 @@ xcf_load_tile (XcfInfo       *info,
       gint n_components = babl_format_get_n_components (format);
 
       xcf_read_component (info, bpp / n_components, tile_data,
-                          tile_size / n_components);
+                          tile_size / bpp * n_components);
     }
 
   gegl_buffer_set (buffer, tile_rect, 0, format, tile_data,
diff --git a/app/xcf/xcf-save.c b/app/xcf/xcf-save.c
index c9508df..b0e034c 100644
--- a/app/xcf/xcf-save.c
+++ b/app/xcf/xcf-save.c
@@ -1646,7 +1646,7 @@ xcf_save_tile (XcfInfo        *info,
       gint n_components = babl_format_get_n_components (format);
 
       xcf_write_component_check_error (info, bpp / n_components, tile_data,
-                                       tile_size / n_components);
+                                       tile_size / bpp * n_components);
     }
 
   return TRUE;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]