[gimp/gimp-2-8] Bug 726761 - Alias PIX image encoding broken



commit f13559a360400495f9eb2aa629d9d1e187797169
Author: Michael Natterer <mitch gimp org>
Date:   Fri Apr 11 15:25:22 2014 +0200

    Bug 726761 - Alias PIX image encoding broken
    
    save_image(): remove bogus "- 1" from the calculation of the height of
    the row of tiles to save. Fixes garbage saved to the last line of all
    PIX files.
    
    (cherry picked from commit a5b92424b3625b18da59deb1acac0e77337676fb)

 plug-ins/common/file-pix.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/plug-ins/common/file-pix.c b/plug-ins/common/file-pix.c
index 5e267a0..48dc99b 100644
--- a/plug-ins/common/file-pix.c
+++ b/plug-ins/common/file-pix.c
@@ -553,8 +553,9 @@ save_image (const gchar  *filename,
 
       for (i = 0; i < drawable->height;)
         {
-          rectHeight = (tile_height < (drawable->height - i - 1)) ?
-            tile_height : (drawable->height - i - 1);
+          rectHeight = (tile_height < (drawable->height - i)) ?
+                        tile_height : (drawable->height - i);
+
           gimp_pixel_rgn_get_rect (&pixel_rgn, src_base, 0, i,
                                    drawable->width, rectHeight);
 
@@ -605,8 +606,9 @@ save_image (const gchar  *filename,
 
       for (i = 0; i < drawable->height;)
         {
-          rectHeight = (tile_height < (drawable->height - i - 1)) ?
-            tile_height : (drawable->height - i - 1);
+          rectHeight = (tile_height < (drawable->height - i)) ?
+                        tile_height : (drawable->height - i);
+
           gimp_pixel_rgn_get_rect (&pixel_rgn, src_base, 0, i,
                                    drawable->width, rectHeight);
 


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