diff --git a/.gitmodules b/.gitmodules index 5517ee2..f8ce4e3 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,3 @@ [submodule "src/libragephoto"] path = src/libragephoto url = https://github.com/Syping/libragephoto.git -branch = 0.2.0 diff --git a/src/SnapmaticPicture.cpp b/src/SnapmaticPicture.cpp index 3226eac..76a7a3c 100644 --- a/src/SnapmaticPicture.cpp +++ b/src/SnapmaticPicture.cpp @@ -268,7 +268,7 @@ inline void gta5view_export_save(QIODevice *ioDevice, RagePhotoData *data) gta5view_uInt32ToCharLE(data->headerSum, uInt32Buffer); ioDevice->write(uInt32Buffer, 4); - gta5view_uInt32ToCharLE(data->photoBuffer, uInt32Buffer); + gta5view_uInt32ToCharLE(data->jpegBuffer, uInt32Buffer); ioDevice->write(uInt32Buffer, 4); compressedData = qCompress(QByteArray::fromRawData(data->jpeg, data->jpegSize), 9); @@ -366,7 +366,8 @@ bool SnapmaticPicture::preloadFile() return false; } - const QByteArray fileData = picFile.readAll(); + const qint64 fileSize = picFile.size(); + const QByteArray fileData = picFile.read(fileSize); bool ok = p_ragePhoto.load(fileData.constData(), fileData.size()); picFormat = p_ragePhoto.format(); diff --git a/src/libragephoto b/src/libragephoto index 8e73219..255c1a2 160000 --- a/src/libragephoto +++ b/src/libragephoto @@ -1 +1 @@ -Subproject commit 8e732195493c4a4d5f120f290e77524645d8772e +Subproject commit 255c1a28b94ec3dc2851b916f4565ba4d9ff004d