r21427 by craig -
scribus-commit
scribus-commit at lists.scribus.net
Mon Aug 1 22:10:06 UTC 2016
Author: craig
Date: Mon Aug 1 22:10:06 2016
New Revision: 21427
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21427
Log:
#14247: Add Krita import functionality from Scott Petrovic
Added:
trunk/Scribus/scribus/imagedataloaders/scimgdataloader_kra.cpp (with props)
trunk/Scribus/scribus/imagedataloaders/scimgdataloader_kra.h (with props)
Modified:
trunk/Scribus/scribus/CMakeLists.txt
trunk/Scribus/scribus/scimage.cpp
trunk/Scribus/scribus/util_formats.cpp
trunk/Scribus/scribus/util_formats.h
Modified: trunk/Scribus/scribus/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21427&path=/trunk/Scribus/scribus/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/CMakeLists.txt Mon Aug 1 22:10:06 2016
@@ -690,6 +690,7 @@
imagedataloaders/scimgdataloader.cpp
imagedataloaders/scimgdataloader_gimp.cpp
imagedataloaders/scimgdataloader_jpeg.cpp
+ imagedataloaders/scimgdataloader_kra.cpp
imagedataloaders/scimgdataloader_ora.cpp
imagedataloaders/scimgdataloader_pdf.cpp
imagedataloaders/scimgdataloader_pgf.cpp
Modified: trunk/Scribus/scribus/scimage.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21427&path=/trunk/Scribus/scribus/scimage.cpp
==============================================================================
--- trunk/Scribus/scribus/scimage.cpp (original)
+++ trunk/Scribus/scribus/scimage.cpp Mon Aug 1 22:10:06 2016
@@ -17,6 +17,7 @@
#endif
#include "imagedataloaders/scimgdataloader_jpeg.h"
#include "imagedataloaders/scimgdataloader_ora.h"
+#include "imagedataloaders/scimgdataloader_kra.h"
#include "imagedataloaders/scimgdataloader_pict.h"
#include "imagedataloaders/scimgdataloader_ps.h"
#include "imagedataloaders/scimgdataloader_psd.h"
@@ -2010,6 +2011,12 @@
if (pDataLoader.get())
pDataLoader->setRequest(imgInfo.isRequest, imgInfo.RequestProps);
}
+ else if (ext == "kra")
+ {
+ pDataLoader.reset( new ScImgDataLoader_KRA() );
+ if (pDataLoader.get())
+ pDataLoader->setRequest(imgInfo.isRequest, imgInfo.RequestProps);
+ }
else if (ext == "pat")
pDataLoader.reset( new ScImgDataLoader_GIMP() );
else if (ext == "pgf")
@@ -2284,6 +2291,11 @@
pDataLoader.reset( new ScImgDataLoader_ORA() );
pDataLoader->setRequest(imgInfo.isRequest, imgInfo.RequestProps);
}
+ else if (ext == "kra")
+ {
+ pDataLoader.reset( new ScImgDataLoader_KRA() );
+ pDataLoader->setRequest(imgInfo.isRequest, imgInfo.RequestProps);
+ }
#ifdef GMAGICK_FOUND
else if (fmtImg.contains(ext))
pDataLoader.reset( new ScImgDataLoader_QT() );
Modified: trunk/Scribus/scribus/util_formats.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21427&path=/trunk/Scribus/scribus/util_formats.cpp
==============================================================================
--- trunk/Scribus/scribus/util_formats.cpp (original)
+++ trunk/Scribus/scribus/util_formats.cpp Mon Aug 1 22:10:06 2016
@@ -31,6 +31,7 @@
m_fmts.insert(FormatsManager::GIF, QStringList() << "gif");
m_fmts.insert(FormatsManager::JPEG, QStringList() << "jpg" << "jpeg");
m_fmts.insert(FormatsManager::ORA, QStringList() << "ora");
+ m_fmts.insert(FormatsManager::KRA, QStringList() << "kra");
m_fmts.insert(FormatsManager::PAT, QStringList() << "pat");
m_fmts.insert(FormatsManager::PCT, QStringList() << "pct" << "pic" << "pict");
m_fmts.insert(FormatsManager::PDF, QStringList() << "pdf");
@@ -84,6 +85,7 @@
m_fmtNames[FormatsManager::GIF] = QObject::tr("GIF");
m_fmtNames[FormatsManager::JPEG] = QObject::tr("JPEG");
m_fmtNames[FormatsManager::ORA] = QObject::tr("Open Raster");
+ m_fmtNames[FormatsManager::KRA] = QObject::tr("Krita");
m_fmtNames[FormatsManager::PAT] = QObject::tr("Pattern Files");
m_fmtNames[FormatsManager::PDF] = QObject::tr("PDF Document");
m_fmtNames[FormatsManager::PGF] = QObject::tr("PGF");
@@ -111,6 +113,7 @@
m_fmtMimeTypes.insert(FormatsManager::GIF, QStringList() << "image/gif");
m_fmtMimeTypes.insert(FormatsManager::JPEG, QStringList() << "image/jpeg");
m_fmtMimeTypes.insert(FormatsManager::ORA, QStringList() << "");
+ m_fmtMimeTypes.insert(FormatsManager::KRA, QStringList() << "application/x-krita");
m_fmtMimeTypes.insert(FormatsManager::PAT, QStringList() << "");
m_fmtMimeTypes.insert(FormatsManager::PCT, QStringList() << "");
m_fmtMimeTypes.insert(FormatsManager::PDF, QStringList() << "application/pdf");
Modified: trunk/Scribus/scribus/util_formats.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21427&path=/trunk/Scribus/scribus/util_formats.h
==============================================================================
--- trunk/Scribus/scribus/util_formats.h (original)
+++ trunk/Scribus/scribus/util_formats.h Mon Aug 1 22:10:06 2016
@@ -37,14 +37,14 @@
enum ScImageFormatType
{
- ALLIMAGES = 1|2|4|8|16|32|64|128|256|512|1024|2048|4096|8192|16384|32768|524288|1048576|2097152|4194304,
+ ALLIMAGES = 1|2|4|8|16|32|64|128|256|512|1024|2048|4096|8192|16384|32768|524288|1048576|2097152|4194304|8388608,
#ifdef GMAGICK_FOUND
- IMAGESIMGFRAME = 1|2|4|16|32|64|128|256|512|65536|1048576|2097152|4194304, // all Types suitable for Image Frames
+ IMAGESIMGFRAME = 1|2|4|16|32|64|128|256|512|65536|1048576|2097152|4194304|8388608, // all Types suitable for Image Frames
#else
- IMAGESIMGFRAME = 1|2|4|16|32|64|128|256|512|262144|524288|1048576|2097152|4194304, // all Types suitable for Image Frames
+ IMAGESIMGFRAME = 1|2|4|16|32|64|128|256|512|262144|524288|1048576|2097152|4194304|8388608, // all Types suitable for Image Frames
#endif
VECTORIMAGES = 1|64|1024|2048|16384|32768|131072|262144|4194304, // All pure vector image types
- RASTORIMAGES = 2|4|8|32|128|256|512|65536|524288|1048576|2097152, // All pure rastor image types
+ RASTORIMAGES = 2|4|8|32|128|256|512|65536|524288|1048576|2097152|8388608, // All pure rastor image types
EPS = 1, // Encapsulated PostScript
GIF = 2, // GIF files
JPEG = 4, // JPEG
@@ -69,7 +69,8 @@
BMP = 524288, // BMP
PGF = 1048576, // PGF
ORA = 2097152, // ORA
- QT = 4194304 // Qt
+ QT = 4194304, // Qt
+ KRA = 8388608 // Krita
};
/*
More information about the scribus-commit
mailing list