[gimp] plug-ins: fix the fix for #6116 grayscale gif animation.



commit 1731c875a18d64bb471342ee7838393f7b10de92
Author: Jacob Boerema <jgboerema gmail com>
Date:   Mon May 31 11:59:58 2021 -0400

    plug-ins: fix the fix for #6116 grayscale gif animation.
    
    I must have not been awake yet when I pushed the
    fix for #6116 because it has two problems:
    - Updating cur_progress caused by not editing the
      for loop after a copy/paste, found thanks to
      Stanislav Grinkov.
    - Not using the correct drawable to determine the
      drawable_type which I noticed while fixing the
      above issue.
    
    These issues are not present in the backported
    version for 2.10.

 plug-ins/common/file-gif-save.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/plug-ins/common/file-gif-save.c b/plug-ins/common/file-gif-save.c
index 9da6d5a533..36b69fdfcd 100644
--- a/plug-ins/common/file-gif-save.c
+++ b/plug-ins/common/file-gif-save.c
@@ -822,11 +822,9 @@ save_image (GFile         *file,
       if (drawable_type == GIMP_GRAY_IMAGE ||
           drawable_type == GIMP_INDEXED_IMAGE)
         {
-          for (list = layers, i = nlayers - 1;
-              list && i >= 0;
-              list = g_list_next (list), i--, cur_progress = (nlayers - i) * rows)
+          for (list = layers; list; list = g_list_next (list))
             {
-              GimpImageType dr_type = gimp_drawable_type (drawable);
+              GimpImageType dr_type = gimp_drawable_type (list->data);
 
               if (dr_type == GIMP_GRAYA_IMAGE ||
                   dr_type == GIMP_INDEXEDA_IMAGE)


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