summaryrefslogtreecommitdiffstats
path: root/src/imageutils/jpegcontent.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/imageutils/jpegcontent.cpp')
-rw-r--r--src/imageutils/jpegcontent.cpp19
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;
}