r19880 by fschmid - Part of #12929: Fixed import of 01084361.emf

scribus-commit scribus-commit at lists.scribus.net
Wed Feb 25 20:37:48 UTC 2015


Author: fschmid
Date: Wed Feb 25 20:37:48 2015
New Revision: 19880

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19880
Log:
Part of #12929: Fixed import of 01084361.emf

Modified:
    trunk/Scribus/scribus/plugins/import/emf/importemf.cpp

Modified: trunk/Scribus/scribus/plugins/import/emf/importemf.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19880&path=/trunk/Scribus/scribus/plugins/import/emf/importemf.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/emf/importemf.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/emf/importemf.cpp Wed Feb 25 20:37:48 2015
@@ -3001,6 +3001,22 @@
 				}
 				img = img.convertToFormat(QImage::Format_ARGB32);
 			}
+		}
+		else if ((hCompression == 1) || (hCompression == 2))
+		{
+			QByteArray pattern;
+			pattern.resize(14);
+			pattern.fill(0);
+			quint16 bmType = 0x4D42;
+			quint32 bmSize = bitsBits.count() + headerBits.count() + 14;
+			QDataStream pa(&pattern, QIODevice::WriteOnly);
+			pa.setByteOrder(QDataStream::LittleEndian);
+			pa << bmType;
+			pa << bmSize;
+			bitsBits.prepend(headerBits);
+			bitsBits.prepend(pattern);
+			img.loadFromData(bitsBits, "BMP");
+			img = img.convertToFormat(QImage::Format_ARGB32);
 		}
 		else if (hCompression == 3)
 		{




More information about the scribus-commit mailing list