r17755 by jghali - #11028: Qt image reader backend labels all images as RGB
scribus-commit
scribus-commit at lists.scribus.net
Sat Aug 11 10:40:54 UTC 2012
Author: jghali
Date: Sat Aug 11 10:40:53 2012
New Revision: 17755
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=17755
Log:
#11028: Qt image reader backend labels all images as RGB
Modified:
trunk/Scribus/scribus/scimgdataloader_qt.cpp
Modified: trunk/Scribus/scribus/scimgdataloader_qt.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17755&path=/trunk/Scribus/scribus/scimgdataloader_qt.cpp
==============================================================================
--- trunk/Scribus/scribus/scimgdataloader_qt.cpp (original)
+++ trunk/Scribus/scribus/scimgdataloader_qt.cpp Sat Aug 11 10:40:53 2012
@@ -46,10 +46,12 @@
if( yres <= 1.0 || yres > 3000.0 )
yres = 72.0;
int resInf = m_imageInfoRecord.lowResType;
+ m_imageInfoRecord.colorspace = ColorSpaceRGB;
+ if (m_image.isGrayscale() || m_image.depth() == 1)
+ m_imageInfoRecord.colorspace = ColorSpaceGray;
m_image = m_image.convertToFormat(QImage::Format_ARGB32);
m_image.setDotsPerMeterX ((int) (xres / 0.0254));
m_image.setDotsPerMeterY ((int) (yres / 0.0254));
- m_imageInfoRecord.colorspace = ColorSpaceRGB;
m_imageInfoRecord.xres = qRound(xres);
m_imageInfoRecord.yres = qRound(yres);
m_imageInfoRecord.lowResType = resInf;
More information about the scribus-commit
mailing list