diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-04-08 18:35:06 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-04-08 18:35:06 -0500 |
commit | 29976f7d089ea9de53af84584f039e9ac9ade9c0 (patch) | |
tree | 5502da714d1dd7de94e0ca1075ddd17caaefc6e7 /src/imageutils/jpegcontent.cpp | |
parent | cc2fe8c20d726e0736718b380f221095b7b641ae (diff) | |
download | gwenview-29976f7d089ea9de53af84584f039e9ac9ade9c0.tar.gz gwenview-29976f7d089ea9de53af84584f039e9ac9ade9c0.zip |
Fix Gwenview rotated jpeg image save
This resolves Bug 1436
Diffstat (limited to 'src/imageutils/jpegcontent.cpp')
-rw-r--r-- | src/imageutils/jpegcontent.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/imageutils/jpegcontent.cpp b/src/imageutils/jpegcontent.cpp index b3dc5ff..bab3b9a 100644 --- a/src/imageutils/jpegcontent.cpp +++ b/src/imageutils/jpegcontent.cpp @@ -287,14 +287,14 @@ bool JPEGContent::loadFromData(const TQByteArray& data) { // Adjust the size according to the orientation switch (orientation()) { - case TRANSPOSE: - case ROT_90: - case TRANSVERSE: - case ROT_270: - d->mSize.transpose(); - break; - default: - break; + case TRANSPOSE: + case ROT_90: + case TRANSVERSE: + case ROT_270: + d->mSize.transpose(); + break; + default: + break; } return true; @@ -557,6 +557,7 @@ void JPEGContent::applyPendingTransformation() { // Init transformation jpeg_transform_info transformoption; + memset(&transformoption, 0, sizeof(jpeg_transform_info)); transformoption.transform = findJxform(d->mTransformMatrix); transformoption.force_grayscale = false; transformoption.trim = false; @@ -597,7 +598,7 @@ void JPEGContent::applyPendingTransformation() { (void) jpeg_finish_decompress(&srcinfo); jpeg_destroy_decompress(&srcinfo); - // Set rawData to our new JPEG + // Set rawData to our new JPEG d->mRawData = output; } |