diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-04-08 18:35:06 -0500 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2013-04-09 03:21:43 +0200 |
commit | aa269fe00b44e450afdccaf04ebc090630c82377 (patch) | |
tree | 60bc04b1572964437b066cc27fda165182b1421d /src/imageutils/jpegcontent.cpp | |
parent | f70811478a20d9262841289b048ce86cfd2044a0 (diff) | |
download | gwenview-aa269fe00b44e450afdccaf04ebc090630c82377.tar.gz gwenview-aa269fe00b44e450afdccaf04ebc090630c82377.zip |
Fix Gwenview rotated jpeg image save
This resolves Bug 1436
(cherry picked from commit 29976f7d089ea9de53af84584f039e9ac9ade9c0)
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 c007267..d4f7ed7 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; } |