r14257 by fschmid - Fixed Bug #8549: "Postscript images backround rendered opaque in pdf's although displayed transparent on canvas"

scribus-commit scribus-commit at lists.scribus.net
Tue Nov 3 14:10:20 CET 2009


Revision: 14257
Author: fschmid
Date: 2009-11-03T08:05:15.081985Z
Commit message: Fixed Bug #8549: "Postscript images backround rendered opaque in pdf's although displayed transparent on canvas"

Changeset: 
M  /branches/Version135/Scribus/scribus/scimgdataloader_ps.h
M  /branches/Version135/Scribus/scribus/scimgdataloader_ps.cpp

Diffs:
Index: scribus/scimgdataloader_ps.h
===================================================================
--- scribus/scimgdataloader_ps.h	(revision 14256)
+++ scribus/scimgdataloader_ps.h	(revision 14257)
@@ -44,6 +44,7 @@
 	bool hasThumbnail;
 	bool inTrailer;
 	bool BBoxInTrailer;
+	bool isRotated;
 	int psXSize;
 	int psYSize;
 	int psDepth;
Index: scribus/scimgdataloader_ps.cpp
===================================================================
--- scribus/scimgdataloader_ps.cpp	(revision 14256)
+++ scribus/scimgdataloader_ps.cpp	(revision 14257)
@@ -227,6 +227,11 @@
 					BBox = tmp.remove("%%BoundingBox");
 				}
 			}
+			if (tmp.startsWith("%%Orientation:"))
+			{
+				if (tmp.contains("Landscape"))
+					isRotated = true;
+			}
 			if (tmp.startsWith("%%CyanPlate:"))
 			{
 				colorPlates.insert("Cyan", tmp.remove("%%CyanPlate: "));
@@ -572,7 +577,7 @@
 			if (retg == 0)
 			{
 				m_image.load(tmpFile);
-				if (extensionIndicatesEPS(ext) && BBoxInTrailer)
+				if ((extensionIndicatesEPS(ext) && BBoxInTrailer) || (isRotated))
 				{
 					int ex = qRound(x * gsRes / 72.0);
 					int ey = qRound(m_image.height() - h);
@@ -1651,7 +1656,7 @@
 		if (retg == 0)
 		{
 			m_image.load(tmpFile);
-			if (extensionIndicatesEPS(ext) && BBoxInTrailer)
+			if ((extensionIndicatesEPS(ext) && BBoxInTrailer) || (isRotated))
 			{
 				int ex = qRound(x * gsRes / 72.0);
 				int ey = qRound(m_image.height() - h);
@@ -1659,7 +1664,7 @@
 				int eh = qRound(h - y * gsRes / 72.0);
 				m_image = m_image.copy(ex, ey, ew, eh);
 			}
-			if (!ScCore->havePNGAlpha())
+			if ((!ScCore->havePNGAlpha()) || (isRotated))
 			{
 				int wi = m_image.width();
 				int hi = m_image.height();




More information about the scribus-commit mailing list