[gimp/gimp-2-10] plug-ins: enable reading of psp images with file versions > 6.
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-10] plug-ins: enable reading of psp images with file versions > 6.
- Date: Mon, 31 Aug 2020 12:12:39 +0000 (UTC)
commit 7746e829c2d7a1164297e39bd019f80d09630ef4
Author: Jacob Boerema <jgboerema gmail com>
Date: Sun Aug 30 16:45:10 2020 -0400
plug-ins: enable reading of psp images with file versions > 6.
(cherry picked from commit 85241a2)
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 cef1a48d64..26df16b1fd 100644
--- a/plug-ins/common/file-psp.c
+++ b/plug-ins/common/file-psp.c
@@ -1865,15 +1865,11 @@ load_image (const gchar *filename,
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]