mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2025-07-15 11:14:18 -04:00
Compare commits
5 Commits
v5.14.0-rc
...
v5.16.0
Author | SHA1 | Date | |
---|---|---|---|
cc219211bb | |||
f2adcb81d1 | |||
814c7a2b30 | |||
d7f457a124 | |||
69c4a4b84a |
@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12)
|
|||||||
project(KImageFormats)
|
project(KImageFormats)
|
||||||
|
|
||||||
include(FeatureSummary)
|
include(FeatureSummary)
|
||||||
find_package(ECM 5.14.0 NO_MODULE)
|
find_package(ECM 5.16.0 NO_MODULE)
|
||||||
set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake Modules." URL "https://projects.kde.org/projects/kdesupport/extra-cmake-modules")
|
set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake Modules." URL "https://projects.kde.org/projects/kdesupport/extra-cmake-modules")
|
||||||
feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND FATAL_ON_MISSING_REQUIRED_PACKAGES)
|
feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND FATAL_ON_MISSING_REQUIRED_PACKAGES)
|
||||||
|
|
||||||
|
@ -129,7 +129,7 @@ int main(int argc, char ** argv)
|
|||||||
foreach (QFileInfo fi, imgdir.entryInfoList()) {
|
foreach (QFileInfo fi, imgdir.entryInfoList()) {
|
||||||
int suffixPos = fi.filePath().count() - suffix.count();
|
int suffixPos = fi.filePath().count() - suffix.count();
|
||||||
QString inputfile = fi.filePath();
|
QString inputfile = fi.filePath();
|
||||||
QString expfile = fi.filePath().replace(suffixPos, suffix.count(), "png");
|
QString expfile = fi.filePath().replace(suffixPos, suffix.count(), QStringLiteral("png"));
|
||||||
QString expfilename = QFileInfo(expfile).fileName();
|
QString expfilename = QFileInfo(expfile).fileName();
|
||||||
|
|
||||||
QImageReader inputReader(inputfile, format.constData());
|
QImageReader inputReader(inputfile, format.constData());
|
||||||
|
@ -75,7 +75,7 @@ int main(int argc, char ** argv)
|
|||||||
|
|
||||||
foreach (QFileInfo fi, imgdir.entryInfoList()) {
|
foreach (QFileInfo fi, imgdir.entryInfoList()) {
|
||||||
int suffixPos = fi.filePath().count() - suffix.count();
|
int suffixPos = fi.filePath().count() - suffix.count();
|
||||||
QString pngfile = fi.filePath().replace(suffixPos, suffix.count(), "png");
|
QString pngfile = fi.filePath().replace(suffixPos, suffix.count(), QStringLiteral("png"));
|
||||||
QString pngfilename = QFileInfo(pngfile).fileName();
|
QString pngfilename = QFileInfo(pngfile).fileName();
|
||||||
|
|
||||||
QImageReader pngReader(pngfile, "png");
|
QImageReader pngReader(pngfile, "png");
|
||||||
|
@ -2,6 +2,6 @@
|
|||||||
Type=Service
|
Type=Service
|
||||||
X-KDE-ServiceTypes=QImageIOPlugins
|
X-KDE-ServiceTypes=QImageIOPlugins
|
||||||
X-KDE-ImageFormat=psd
|
X-KDE-ImageFormat=psd
|
||||||
X-KDE-MimeType=image/x-psd
|
X-KDE-MimeType=image/vnd.adobe.photoshop
|
||||||
X-KDE-Read=true
|
X-KDE-Read=true
|
||||||
X-KDE-Write=false
|
X-KDE-Write=false
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"Keys": [ "psd" ],
|
"Keys": [ "psd" ],
|
||||||
"MimeTypes": [ "image/x-psd" ]
|
"MimeTypes": [ "image/vnd.adobe.photoshop" ]
|
||||||
}
|
}
|
||||||
|
@ -32,29 +32,29 @@
|
|||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
QCoreApplication app(argc, argv);
|
QCoreApplication app(argc, argv);
|
||||||
QCoreApplication::addLibraryPath(QLatin1String(PLUGIN_DIR));
|
QCoreApplication::addLibraryPath(QStringLiteral(PLUGIN_DIR));
|
||||||
QCoreApplication::setApplicationName(QLatin1String("imageconverter"));
|
QCoreApplication::setApplicationName(QStringLiteral("imageconverter"));
|
||||||
QCoreApplication::setApplicationVersion(QLatin1String("1.01.01.0"));
|
QCoreApplication::setApplicationVersion(QStringLiteral("1.01.01.0"));
|
||||||
|
|
||||||
QCommandLineParser parser;
|
QCommandLineParser parser;
|
||||||
parser.setApplicationDescription(QLatin1String("Converts images from one format to another"));
|
parser.setApplicationDescription(QStringLiteral("Converts images from one format to another"));
|
||||||
parser.addHelpOption();
|
parser.addHelpOption();
|
||||||
parser.addVersionOption();
|
parser.addVersionOption();
|
||||||
parser.addPositionalArgument(QLatin1String("in"), QLatin1String("input image file"));
|
parser.addPositionalArgument(QStringLiteral("in"), QStringLiteral("input image file"));
|
||||||
parser.addPositionalArgument(QLatin1String("out"), QLatin1String("output image file"));
|
parser.addPositionalArgument(QStringLiteral("out"), QStringLiteral("output image file"));
|
||||||
QCommandLineOption informat(
|
QCommandLineOption informat(
|
||||||
QStringList() << QLatin1String("i") << QLatin1String("informat"),
|
QStringList() << QStringLiteral("i") << QStringLiteral("informat"),
|
||||||
QLatin1String("Image format for input file"),
|
QStringLiteral("Image format for input file"),
|
||||||
QLatin1String("format"));
|
QStringLiteral("format"));
|
||||||
parser.addOption(informat);
|
parser.addOption(informat);
|
||||||
QCommandLineOption outformat(
|
QCommandLineOption outformat(
|
||||||
QStringList() << QLatin1String("o") << QLatin1String("outformat"),
|
QStringList() << QStringLiteral("o") << QStringLiteral("outformat"),
|
||||||
QLatin1String("Image format for output file"),
|
QStringLiteral("Image format for output file"),
|
||||||
QLatin1String("format"));
|
QStringLiteral("format"));
|
||||||
parser.addOption(outformat);
|
parser.addOption(outformat);
|
||||||
QCommandLineOption listformats(
|
QCommandLineOption listformats(
|
||||||
QStringList() << QLatin1String("l") << QLatin1String("list"),
|
QStringList() << QStringLiteral("l") << QStringLiteral("list"),
|
||||||
QLatin1String("List supported image formats"));
|
QStringLiteral("List supported image formats"));
|
||||||
parser.addOption(listformats);
|
parser.addOption(listformats);
|
||||||
|
|
||||||
parser.process(app);
|
parser.process(app);
|
||||||
|
Reference in New Issue
Block a user