[gimp] plug-ins: enable reading of psp images with file versions > 6.



commit 85241a205b9e7ce8f50d3ad86432d8dd1b869dbf
Author: Jacob Boerema <jgboerema gmail com>
Date:   Tue Aug 25 15:04:24 2020 -0400

    plug-ins: enable reading of psp images with file versions > 6.

 plug-ins/common/file-psp.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)
---
diff --git a/plug-ins/common/file-psp.c b/plug-ins/common/file-psp.c
index c22ff34553..ec0ac8739f 100644
--- a/plug-ins/common/file-psp.c
+++ b/plug-ins/common/file-psp.c
@@ -2025,15 +2025,11 @@ load_image (GFile   *file,
   psp_ver_major = GUINT16_FROM_LE (psp_ver_major);
   psp_ver_minor = GUINT16_FROM_LE (psp_ver_minor);
 
-  /* I only have the documentation for file format version 3.0,
-   * but PSP 6 writes version 4.0. Let's hope it's backwards compatible.
-   * Earlier versions probably don't have all the fields I expect
-   * so don't accept those.
+  /* We don't have the documentation for file format versions before 3.0,
+   * but newer versions should be mostly backwards compatible so that
+   * we can still read the image and skip unknown parts safely.
    */
-  if (psp_ver_major != 3 &&
-      psp_ver_major != 4 &&
-      psp_ver_major != 5 &&
-      psp_ver_major != 6)
+  if (psp_ver_major < 3)
     {
       g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
                    _("Unsupported PSP file format version %d.%d."),


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