[gimp] Bug 783703: no progress bar changes when exporting to psd format



commit cb78618d75692ee4e9f1f3da2d55317ecc3385e4
Author: Massimo Valentini <mvalentini src gnome org>
Date:   Sun Jan 14 10:11:52 2018 +0100

    Bug 783703: no progress bar changes when exporting to psd format

 plug-ins/file-psd/psd-save.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/plug-ins/file-psd/psd-save.c b/plug-ins/file-psd/psd-save.c
index 1182ca4..ce66081 100644
--- a/plug-ins/file-psd/psd-save.c
+++ b/plug-ins/file-psd/psd-save.c
@@ -1137,11 +1137,14 @@ save_layer_and_mask (FILE   *fd,
 
   for (i = PSDImageData.nLayers - 1; i >= 0; i--)
     {
+      gimp_progress_update ((PSDImageData.nLayers - i - 1.0) / (PSDImageData.nLayers + 1.0));
+
       IFDBG printf ("\t\tWriting pixel data for layer slot %d\n", i);
       write_pixel_data(fd, PSDImageData.lLayers[i].id, ChannelLengthPos[i], 0);
       g_free (ChannelLengthPos[i]);
     }
 
+  gimp_progress_update (PSDImageData.nLayers / (PSDImageData.nLayers + 1.0));
   eof_pos = ftell (fd);
 
   /* Write actual size of Layer info section */
@@ -1611,6 +1614,9 @@ save_image (const gchar  *filename,
   IFDBG printf ("----- Closing PSD file, done -----\n\n");
 
   fclose (fd);
+
+  gimp_progress_update (1.0);
+
   return TRUE;
 }
 


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