diff --git a/RagePhoto.cpp b/RagePhoto.cpp index ff778c4..8b44dfb 100644 --- a/RagePhoto.cpp +++ b/RagePhoto.cpp @@ -357,7 +357,27 @@ bool RagePhoto::load() } else if (format == static_cast(ExportFormat::G5E2P)) { p_photoFormat = PhotoFormat::G5EX; - p_fileData = dataBuffer.readAll(); + p_fileData = qUncompress(dataBuffer.readAll()); + p_inputMode = 0; + return load(); + } + else if (format == static_cast(ExportFormat::G5E1P)) { + size = dataBuffer.skip(1); + if (size != 1) + return false; + + char length[1]; + size = dataBuffer.read(length, 1); + if (size != 1) + return false; + int i_length = QByteArray::number((int)length[0], 16).toInt() + 6; + + size = dataBuffer.skip(i_length); + if (size != i_length) + return false; + + p_photoFormat = PhotoFormat::G5EX; + p_fileData = qUncompress(dataBuffer.readAll()); p_inputMode = 0; return load(); } diff --git a/RagePhoto.h b/RagePhoto.h index 26491e0..cffd486 100644 --- a/RagePhoto.h +++ b/RagePhoto.h @@ -28,6 +28,7 @@ class RagePhoto : public QObject Q_OBJECT public: enum class ExportFormat : quint32 { + G5E1P = 0x454C0010U, G5E2P = 0x01000032U, G5E2S = 0x02000032U, G5E3P = 0x01000033U,