[gimp] Bug 791514 - Cannot export to webp file.



commit 317f7fa5ca5c47920ea7dbef43b5c6fd6185a9e7
Author: Jehan <jehan girinstud io>
Date:   Fri Dec 22 19:25:11 2017 +0100

    Bug 791514 - Cannot export to webp file.
    
    fopen() modes "wb+" and "w+b" are aliases of the same opening mode
    (truncate/create in binary read/write). But it turns out that Windows
    implementation does not understand "wb+". The alias "w+b" works fine in
    my tests.

 plug-ins/file-webp/file-webp-save.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/plug-ins/file-webp/file-webp-save.c b/plug-ins/file-webp/file-webp-save.c
index c810e86..9ed64b2 100644
--- a/plug-ins/file-webp/file-webp-save.c
+++ b/plug-ins/file-webp/file-webp-save.c
@@ -174,7 +174,7 @@ save_layer (const gchar    *filename,
                                  gimp_filename_to_utf8(filename));
 
       /* Attempt to open the output file */
-      if ((outfile = g_fopen (filename, "wb+")) == NULL)
+      if ((outfile = g_fopen (filename, "w+b")) == NULL)
         {
           g_set_error (error, G_FILE_ERROR,
                        g_file_error_from_errno (errno),


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