r20046 by fschmid - Fixed Bug #10627: Unable to open some PS images into Image Frame

scribus-commit scribus-commit at lists.scribus.net
Sat May 2 09:36:12 UTC 2015


Author: fschmid
Date: Sat May  2 09:36:12 2015
New Revision: 20046

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20046
Log:
Fixed Bug #10627: Unable to open some PS images into Image Frame

Modified:
    trunk/Scribus/scribus/imagedataloaders/scimgdataloader_ps.cpp

Modified: trunk/Scribus/scribus/imagedataloaders/scimgdataloader_ps.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20046&path=/trunk/Scribus/scribus/imagedataloaders/scimgdataloader_ps.cpp
==============================================================================
--- trunk/Scribus/scribus/imagedataloaders/scimgdataloader_ps.cpp (original)
+++ trunk/Scribus/scribus/imagedataloaders/scimgdataloader_ps.cpp Sat May  2 09:36:12 2015
@@ -452,15 +452,16 @@
 		}
 	}
 	f.close();
-	return found;
+	return true;
 }
 
 bool ScImgDataLoader_PS::loadPicture(const QString& fn, int page, int gsRes, bool thumbnail)
 {
-	QStringList args;
-	double x, y, b, h;
+	double x = 0;
+	double y = 0;
+	double b = 0;
+	double h = 0;
 	bool found = false;
-	QString tmp, dummy, cmd1, cmd2, tmp2;
 	QFileInfo fi = QFileInfo(fn);
 	if (!fi.exists())
 		return false;
@@ -644,7 +645,16 @@
 			args.append("-sOutputFile="+tmpFiles);
 			args.append(picFile);
 //			qDebug() << "scimgdataloader_ps:" << args;
-			int retg = callGS(args, "bitcmyk");
+			int retg = callGS(args);
+			if (retg == 0)
+			{
+				m_image.load(tmpFile);
+				x = 0;
+				y = 0;
+				b = m_image.width() / gsRes * 72.0;
+				h = m_image.height() / gsRes * 72.0;
+			}
+			retg = callGS(args, "bitcmyk");
 			if (retg == 0)
 			{
 				m_image = QImage( qRound(b * gsRes / 72.0), qRound(h * gsRes / 72.0), QImage::Format_ARGB32 );




More information about the scribus-commit mailing list