r15796 by fschmid - Added the PGF image format, see http://www.libpgf.org for details.

scribus-commit scribus-commit at lists.scribus.net
Sun Nov 7 10:40:03 CET 2010


Author: fschmid
Date: Sun Nov  7 09:40:03 2010
New Revision: 15796

URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=15796
Log:
Added the PGF image format, see http://www.libpgf.org for details.

Added:
    trunk/Scribus/scribus/scimgdataloader_pgf.cpp
    trunk/Scribus/scribus/scimgdataloader_pgf.h
    trunk/Scribus/scribus/third_party/pgf/
    trunk/Scribus/scribus/third_party/pgf/BitStream.h
    trunk/Scribus/scribus/third_party/pgf/CMakeLists.txt
    trunk/Scribus/scribus/third_party/pgf/Decoder.cpp
    trunk/Scribus/scribus/third_party/pgf/Decoder.h
    trunk/Scribus/scribus/third_party/pgf/Encoder.cpp
    trunk/Scribus/scribus/third_party/pgf/Encoder.h
    trunk/Scribus/scribus/third_party/pgf/PGFimage.cpp
    trunk/Scribus/scribus/third_party/pgf/PGFimage.h
    trunk/Scribus/scribus/third_party/pgf/PGFplatform.h
    trunk/Scribus/scribus/third_party/pgf/PGFtypes.h
    trunk/Scribus/scribus/third_party/pgf/Stream.cpp
    trunk/Scribus/scribus/third_party/pgf/Stream.h
    trunk/Scribus/scribus/third_party/pgf/Subband.cpp
    trunk/Scribus/scribus/third_party/pgf/Subband.h
    trunk/Scribus/scribus/third_party/pgf/WaveletTransform.cpp
    trunk/Scribus/scribus/third_party/pgf/WaveletTransform.h
Modified:
    trunk/Scribus/scribus/CMakeLists.txt
    trunk/Scribus/scribus/scimage.cpp
    trunk/Scribus/scribus/third_party/CMakeLists.txt
    trunk/Scribus/scribus/util_formats.cpp
    trunk/Scribus/scribus/util_formats.h

Modified: trunk/Scribus/scribus/CMakeLists.txt
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15796&path=/trunk/Scribus/scribus/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/CMakeLists.txt Sun Nov  7 09:40:03 2010
@@ -682,6 +682,7 @@
   scimgdataloader_gimp.cpp
   scimgdataloader_jpeg.cpp
   scimgdataloader_pdf.cpp
+  scimgdataloader_pgf.cpp
   scimgdataloader_pict.cpp
   scimgdataloader_ps.cpp
   scimgdataloader_psd.cpp
@@ -852,6 +853,7 @@
   ${CMAKE_CURRENT_BINARY_DIR}/styles
   ${CMAKE_CURRENT_BINARY_DIR}/text
   ${CMAKE_CURRENT_BINARY_DIR}/third_party/wpg
+  ${CMAKE_CURRENT_BINARY_DIR}/third_party/pgf
 )
 
 IF(HAVE_OSG)
@@ -874,6 +876,8 @@
   SET(SCRIBUS_2GEOM_LIB "scribus_2geom_lib")
 ENDIF (HAVE_BOOST)
 SET(SCRIBUS_WPG_LIB "scribus_wpg_lib")
+
+SET(SCRIBUS_PGF_LIB "scribus_pgf_lib")
 
 INCLUDE_DIRECTORIES(
   ${CMAKE_SOURCE_DIR}
@@ -1035,6 +1039,7 @@
   ${SCRIBUS_STYLES_LIB}
   ${SCRIBUS_FONTS_LIB}
   ${SCRIBUS_WPG_LIB}
+  ${SCRIBUS_PGF_LIB}
 )
 
 IF(HAVE_PODOFO)

Modified: trunk/Scribus/scribus/scimage.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15796&path=/trunk/Scribus/scribus/scimage.cpp
==============================================================================
--- trunk/Scribus/scribus/scimage.cpp (original)
+++ trunk/Scribus/scribus/scimage.cpp Sun Nov  7 09:40:03 2010
@@ -20,6 +20,7 @@
 #include "scimgdataloader_ps.h"
 #include "scimgdataloader_psd.h"
 #include "scimgdataloader_pdf.h"
+#include "scimgdataloader_pgf.h"
 #include "scimgdataloader_qt.h"
 #include "scimgdataloader_tiff.h"
 #include "scimgdataloader_wpg.h"
@@ -1749,6 +1750,8 @@
 	}
 	else if (ext == "pat")
 		pDataLoader.reset( new ScImgDataLoader_GIMP() );
+	else if (ext == "pgf")
+		pDataLoader.reset( new ScImgDataLoader_PGF() );
 	else if ((ext == "pct") || (ext == "pic") || (ext == "pict"))
 		pDataLoader.reset( new ScImgDataLoader_PICT() );
 	else if (ext == "wpg")
@@ -2012,6 +2015,8 @@
 		pDataLoader.reset( new ScImgDataLoader_JPEG() );
 	else if (ext == "pat")
 		pDataLoader.reset( new ScImgDataLoader_GIMP() );
+	else if (ext == "pgf")
+		pDataLoader.reset( new ScImgDataLoader_PGF() );
 	else if ((ext == "pct") || (ext == "pic") || (ext == "pict"))
 		pDataLoader.reset( new ScImgDataLoader_PICT() );
 	else if (ext == "wpg")

Modified: trunk/Scribus/scribus/third_party/CMakeLists.txt
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15796&path=/trunk/Scribus/scribus/third_party/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/third_party/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/third_party/CMakeLists.txt Sun Nov  7 09:40:03 2010
@@ -11,3 +11,5 @@
 ENDIF(HAVE_BOOST)
 
 ADD_SUBDIRECTORY(wpg)
+
+ADD_SUBDIRECTORY(pgf)

Modified: trunk/Scribus/scribus/util_formats.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15796&path=/trunk/Scribus/scribus/util_formats.cpp
==============================================================================
--- trunk/Scribus/scribus/util_formats.cpp (original)
+++ trunk/Scribus/scribus/util_formats.cpp Sun Nov  7 09:40:03 2010
@@ -21,6 +21,7 @@
 	m_fmts.insert(FormatsManager::JPEG, QStringList() << "jpg" << "jpeg");
 	m_fmts.insert(FormatsManager::PAT,  QStringList() << "pat");
 	m_fmts.insert(FormatsManager::PDF,  QStringList() << "pdf");
+	m_fmts.insert(FormatsManager::PGF,  QStringList() << "pgf");
 	m_fmts.insert(FormatsManager::PNG,  QStringList() << "png");
 	m_fmts.insert(FormatsManager::PS,   QStringList() << "ps");
 	m_fmts.insert(FormatsManager::PSD,  QStringList() << "psd");
@@ -44,6 +45,7 @@
 	m_fmtNames[FormatsManager::JPEG] = QObject::tr("JPEG");
 	m_fmtNames[FormatsManager::PAT]  = QObject::tr("Pattern Files");
 	m_fmtNames[FormatsManager::PDF]  = QObject::tr("PDF Document");
+	m_fmtNames[FormatsManager::PGF]  = QObject::tr("PGF");
 	m_fmtNames[FormatsManager::PNG]  = QObject::tr("PNG");
 	m_fmtNames[FormatsManager::PS]   = QObject::tr("PostScript \"*.ps\"");
 	m_fmtNames[FormatsManager::PSD]  = QObject::tr("Adobe Photoshop \"*.psd\"");
@@ -67,6 +69,7 @@
 	m_fmtMimeTypes.insert(FormatsManager::JPEG, QStringList() << "image/jpeg");
 	m_fmtMimeTypes.insert(FormatsManager::PAT,  QStringList() << "");
 	m_fmtMimeTypes.insert(FormatsManager::PDF,  QStringList() << "application/pdf");
+	m_fmtMimeTypes.insert(FormatsManager::PGF,  QStringList() << "image/pgf");
 	m_fmtMimeTypes.insert(FormatsManager::PNG,  QStringList() << "image/png");
 	m_fmtMimeTypes.insert(FormatsManager::PS,   QStringList() << "application/postscript");
 	m_fmtMimeTypes.insert(FormatsManager::PSD,  QStringList() << "application/photoshop");
@@ -333,6 +336,8 @@
 				ret = "jpg";
 			else if ((buf[0] == '%') && (buf[1] == 'P') && (buf[2] == 'D') && (buf[3] == 'F'))
 				ret = "pdf";
+			else if ((buf[0] == 'P') && (buf[1] == 'G') && (buf[2] == 'F'))
+				ret = "pgf";
 			else if ((buf[0] == '\x89') && (buf[1] == 'P') && (buf[2] == 'N') && (buf[3] == 'G'))
 				ret = "png";
 			else if ((buf[0] == '8') && (buf[1] == 'B') && (buf[2] == 'P') && (buf[3] == 'S'))

Modified: trunk/Scribus/scribus/util_formats.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15796&path=/trunk/Scribus/scribus/util_formats.h
==============================================================================
--- trunk/Scribus/scribus/util_formats.h (original)
+++ trunk/Scribus/scribus/util_formats.h Sun Nov  7 09:40:03 2010
@@ -37,14 +37,14 @@
 
 		enum ScImageFormatType
 		{
-			ALLIMAGES 		= 1|2|4|8|16|32|64|128|256|512|1024|2048|4096|8192|16384|32768|524288,
+			ALLIMAGES 		= 1|2|4|8|16|32|64|128|256|512|1024|2048|4096|8192|16384|32768|524288|1048576,
 #ifdef GMAGICK_FOUND
-			IMAGESIMGFRAME	= 1|2|4|16|32|64|128|256|512|65536,  // all Types suitable for Image Frames
+			IMAGESIMGFRAME	= 1|2|4|16|32|64|128|256|512|65536|1048576,  // all Types suitable for Image Frames
 #else
-			IMAGESIMGFRAME	= 1|2|4|16|32|64|128|256|512|524288,  // all Types suitable for Image Frames
+			IMAGESIMGFRAME	= 1|2|4|16|32|64|128|256|512|524288|1048576,  // all Types suitable for Image Frames
 #endif
 			VECTORIMAGES	= 1|64|1024|2048|16384|32768|131072|262144,  // All pure vector image types
-			RASTORIMAGES	= 2|4|8|32|128|256|512|65536|524288,  // All pure rastor image types
+			RASTORIMAGES	= 2|4|8|32|128|256|512|65536|524288|1048576,  // All pure rastor image types
 			EPS				= 1,      // Encapsulated PostScript
 			GIF				= 2,      // GIF files
 			JPEG			= 4,      // JPEG
@@ -67,6 +67,7 @@
 			UNICONV			= 131072, // UniConvertor
 			PCT				= 262144,  // Mac Pict
 			BMP				= 524288,  // BMP
+			PGF				= 1048576,  // PGF
 		};
 	
 /*




More information about the scribus-commit mailing list