r18717 by fschmid - Fixed Bug #11947: TIFF files in PAGES archive cannot be read
scribus-commit
scribus-commit at lists.scribus.net
Sun Jan 12 09:53:37 UTC 2014
Author: fschmid
Date: Sun Jan 12 09:53:37 2014
New Revision: 18717
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18717
Log:
Fixed Bug #11947: TIFF files in PAGES archive cannot be read
Modified:
trunk/Scribus/scribus/scimage.cpp
trunk/Scribus/scribus/scimgdataloader_qt.cpp
Modified: trunk/Scribus/scribus/scimage.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18717&path=/trunk/Scribus/scribus/scimage.cpp
==============================================================================
--- trunk/Scribus/scribus/scimage.cpp (original)
+++ trunk/Scribus/scribus/scimage.cpp Sun Jan 12 09:53:37 2014
@@ -1966,6 +1966,9 @@
return false;
alpha.resize(0);
QString ext = fi.suffix().toLower();
+ QString ext2 = getImageType(fn);
+ if (ext.isEmpty() || (ext2 != ext))
+ ext = ext2;
QList<QByteArray> fmtList = QImageReader::supportedImageFormats();
QStringList fmtImg;
for (int i = 0; i < fmtList.count(); i++)
@@ -2102,6 +2105,9 @@
if (!fi.exists())
return;
QString ext = fi.suffix().toLower();
+ QString ext2 = getImageType(fn);
+ if (ext.isEmpty() || (ext2 != ext))
+ ext = ext2;
if (extensionIndicatesPSD(ext))
pDataLoader = new ScImgDataLoader_PSD();
@@ -2236,10 +2242,9 @@
if (cspace != ColorSpace_Rgb && cspace != ColorSpace_Cmyk)
return false;
}
-
- if (ext.isEmpty())
- ext = getImageType(fn);
-
+ QString ext2 = getImageType(fn);
+ if (ext.isEmpty() || (ext2 != ext))
+ ext = ext2;
if (extensionIndicatesPDF(ext))
{
pDataLoader.reset( new ScImgDataLoader_PDF() );
Modified: trunk/Scribus/scribus/scimgdataloader_qt.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18717&path=/trunk/Scribus/scribus/scimgdataloader_qt.cpp
==============================================================================
--- trunk/Scribus/scribus/scimgdataloader_qt.cpp (original)
+++ trunk/Scribus/scribus/scimgdataloader_qt.cpp Sun Jan 12 09:53:37 2014
@@ -10,6 +10,7 @@
#include <QImageReader>
#include <QList>
#include "scimgdataloader_qt.h"
+#include "util_formats.h"
ScImgDataLoader_QT::ScImgDataLoader_QT(void) : ScImgDataLoader()
{
@@ -35,7 +36,16 @@
if (!QFile::exists(fn))
return false;
initialize();
- if (m_image.load(fn))
+ bool loadOK = false;
+ QString ext2 = getImageType(fn);
+ if (!ext2.isEmpty())
+ {
+ ext2 = ext2.toUpper();
+ loadOK = m_image.load(fn, ext2.toLatin1());
+ }
+ else
+ loadOK = m_image.load(fn);
+ if (loadOK)
{
m_imageInfoRecord.type = ImageTypeOther;
m_imageInfoRecord.exifDataValid = false;
More information about the scribus-commit
mailing list