summaryrefslogtreecommitdiffstats
path: root/src/plugins/imageformats
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2024-03-01 19:15:06 +0100
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2024-04-04 16:08:22 +0100
commit7f72a93e874f5e52612983ad3b764f07216bf62e (patch)
tree957a24c97e355f2f9e5c0369898acaa981bdf39b /src/plugins/imageformats
parentadb49d65e0774fa6be0b0d9d490c6f1fc5066a1b (diff)
Port QImage::Format_CMYK32 to CMYK8888
Follow the established convention that byte-oriented image formats have the "8888" suffix, not "32". The old enum name is temporarily left to help port other submodules. This work has been kindly sponsored by the QGIS project (https://qgis.org/). Change-Id: I4b6f10cb22312b614cb9cf4b0ac439907276c538 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/plugins/imageformats')
-rw-r--r--src/plugins/imageformats/jpeg/qjpeghandler.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/imageformats/jpeg/qjpeghandler.cpp b/src/plugins/imageformats/jpeg/qjpeghandler.cpp
index e1488d4c9d..59b73587c5 100644
--- a/src/plugins/imageformats/jpeg/qjpeghandler.cpp
+++ b/src/plugins/imageformats/jpeg/qjpeghandler.cpp
@@ -176,7 +176,7 @@ inline static bool read_jpeg_format(QImage::Format &format, j_decompress_ptr cin
break;
case 4:
if (cinfo->out_color_space == JCS_CMYK)
- format = QImage::Format_CMYK32;
+ format = QImage::Format_CMYK8888;
else
format = QImage::Format_RGB32;
break;
@@ -201,7 +201,7 @@ static bool ensureValidImage(QImage *dest, struct jpeg_decompress_struct *info,
break;
case 4:
if (info->out_color_space == JCS_CMYK)
- format = QImage::Format_CMYK32;
+ format = QImage::Format_CMYK8888;
else
format = QImage::Format_RGB32;
break;
@@ -550,7 +550,7 @@ static bool do_write_jpeg_image(struct jpeg_compress_struct &cinfo,
cinfo.input_components = 1;
cinfo.in_color_space = JCS_GRAYSCALE;
break;
- case QImage::Format_CMYK32:
+ case QImage::Format_CMYK8888:
cinfo.input_components = 4;
cinfo.in_color_space = JCS_CMYK;
break;
@@ -670,7 +670,7 @@ static bool do_write_jpeg_image(struct jpeg_compress_struct &cinfo,
}
}
break;
- case QImage::Format_CMYK32: {
+ case QImage::Format_CMYK8888: {
auto *cmykIn = reinterpret_cast<const quint32 *>(image.constScanLine(cinfo.next_scanline));
auto *cmykOut = reinterpret_cast<quint32 *>(row);
if (invertCMYK) {