summaryrefslogtreecommitdiffstats
path: root/src/plugins/imageformats
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2009-08-27 15:17:12 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2009-08-27 15:17:12 (GMT)
commit8c755acd7549a1de53acb9d93e9a44e333be2b5b (patch)
tree7a1e1f5af9b7796ec0719bf0b5e3baf81b393bab /src/plugins/imageformats
parentd0cdddb61c46a5d27fe0e4fae176964c2009e971 (diff)
parentebf69d862ad816bf9b00e27adc2b6f0d74331338 (diff)
downloadQt-8c755acd7549a1de53acb9d93e9a44e333be2b5b.zip
Qt-8c755acd7549a1de53acb9d93e9a44e333be2b5b.tar.gz
Qt-8c755acd7549a1de53acb9d93e9a44e333be2b5b.tar.bz2
Merge branch '4.5' into 4.6
Conflicts: tests/auto/linguist/lupdate/testdata/good/backslashes/project.ts.result tests/auto/linguist/lupdate/testdata/good/lacksqobject/expectedoutput.txt tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/finddialog.cpp tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/project.ts.result tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/finddialog.cpp tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/project.ts.result tests/auto/linguist/lupdate/testdata/good/parsecpp/finddialog.cpp tests/auto/qcombobox/tst_qcombobox.cpp tests/auto/xmlpatternsview/view/FunctionSignaturesView.cpp tests/auto/xmlpatternsview/view/MainWindow.cpp tests/auto/xmlpatternsview/view/TestCaseView.cpp tests/auto/xmlpatternsview/view/TestResultView.cpp tests/auto/xmlpatternsview/view/TreeSortFilter.cpp tests/auto/xmlpatternsview/view/UserTestCase.cpp tests/auto/xmlpatternsview/view/XDTItemItem.cpp tests/auto/xmlpatternsview/view/main.cpp tests/auto/xmlpatternsxqts/lib/ASTItem.h tests/auto/xmlpatternsxqts/lib/DebugExpressionFactory.h tests/auto/xmlpatternsxqts/lib/ExpressionNamer.h tests/auto/xmlpatternsxqts/lib/ExternalSourceLoader.h tests/auto/xmlpatternsxqts/lib/Global.h tests/auto/xmlpatternsxqts/lib/ResultThreader.h tests/auto/xmlpatternsxqts/lib/TestBaseLine.h tests/auto/xmlpatternsxqts/lib/TestCase.h tests/auto/xmlpatternsxqts/lib/TestResult.h tests/auto/xmlpatternsxqts/lib/TestResultHandler.h tests/auto/xmlpatternsxqts/lib/TestSuiteHandler.h tests/auto/xmlpatternsxqts/lib/Worker.h tests/auto/xmlpatternsxqts/lib/XMLWriter.h tests/auto/xmlpatternsxqts/lib/XQTSTestCase.h
Diffstat (limited to 'src/plugins/imageformats')
-rw-r--r--src/plugins/imageformats/jpeg/qjpeghandler.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/plugins/imageformats/jpeg/qjpeghandler.cpp b/src/plugins/imageformats/jpeg/qjpeghandler.cpp
index 395adca..910366c 100644
--- a/src/plugins/imageformats/jpeg/qjpeghandler.cpp
+++ b/src/plugins/imageformats/jpeg/qjpeghandler.cpp
@@ -493,7 +493,16 @@ private:
in--;
out[i] = qRgb(*in, *in, *in);
}
- } else {
+ } else if (cinfo->out_color_space == JCS_CMYK) {
+ int cols32Bit = scaledWidth() * 4;
+ in = (uchar*)out + cols32Bit;
+ for (uint i = scaledWidth(); i--; ) {
+ in -= 4;
+ int k = in[3];
+ out[i] = qRgb(k * in[0] / 255, k * in[1] / 255, k * in[2] / 255);
+ //out[i] = qRgb(in[0], in[1], in[2]);
+ }
+ } else {
in = (uchar*)out + cols24Bit;
for (uint i = scaledWidth(); i--; ) {
in -= 3;