r15812 by fschmid - PGF import: added 1-bit format.

scribus-commit scribus-commit at lists.scribus.net
Sun Nov 7 22:46:46 CET 2010


Author: fschmid
Date: Sun Nov  7 21:46:46 2010
New Revision: 15812

URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=15812
Log:
PGF import: added 1-bit format.

Modified:
    trunk/Scribus/scribus/scimgdataloader_pgf.cpp

Modified: trunk/Scribus/scribus/scimgdataloader_pgf.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15812&path=/trunk/Scribus/scribus/scimgdataloader_pgf.cpp
==============================================================================
--- trunk/Scribus/scribus/scimgdataloader_pgf.cpp (original)
+++ trunk/Scribus/scribus/scimgdataloader_pgf.cpp Sun Nov  7 21:46:46 2010
@@ -18,8 +18,8 @@
 // C Ansi includes
 extern "C"
 {
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
 #endif
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -78,7 +78,7 @@
 			return false;
 		if (pgfImg.Channels() > 4)
 			return false;
-		if ((pgfImg.Mode() == 0) || (pgfImg.Mode() == 2))
+		if (pgfImg.Mode() == 2)
 			return false;
 		if (QSysInfo::ByteOrder == QSysInfo::BigEndian)
 		{
@@ -89,6 +89,7 @@
 					m_image = QImage(pgfImg.Width(level), pgfImg.Height(level), QImage::Format_Mono);
 					int map[] = {0};
 					pgfImg.GetBitmap(m_image.bytesPerLine(), (UINT8*)m_image.bits(), m_image.depth(), map);
+					m_image.invertPixels();
 				}
 				else if (pgfImg.BPP() == 8)
 				{
@@ -145,6 +146,7 @@
 					m_image = QImage(pgfImg.Width(level), pgfImg.Height(level), QImage::Format_Mono);
 					int map[] = {0};
 					pgfImg.GetBitmap(m_image.bytesPerLine(), (UINT8*)m_image.bits(), 1, map);
+					m_image.invertPixels();
 				}
 				else if (pgfImg.BPP() == 8)
 				{




More information about the scribus-commit mailing list