diff options
-rw-r--r-- | icons/mumble.ico | bin | 9326 -> 140206 bytes | |||
-rw-r--r-- | src/tests/IconSync.cpp | 45 | ||||
-rw-r--r-- | src/tests/IconSync.pro | 8 |
3 files changed, 53 insertions, 0 deletions
diff --git a/icons/mumble.ico b/icons/mumble.ico Binary files differindex 11c84ed6e..db595abab 100644 --- a/icons/mumble.ico +++ b/icons/mumble.ico diff --git a/src/tests/IconSync.cpp b/src/tests/IconSync.cpp new file mode 100644 index 000000000..fb1b67392 --- /dev/null +++ b/src/tests/IconSync.cpp @@ -0,0 +1,45 @@ +#include <QtCore> +#include <QtNetwork> +#include <QtGui> + +int main(int argc, char **argv) { + QApplication a(argc, argv); + + QList<int> sizes; + sizes << 16; + sizes << 24; + sizes << 32; + sizes << 48; + sizes << 64; + sizes << 96; + sizes << 128; + + QStringList qslImages; + + foreach(int size, sizes) { + QImageReader svg("../../icons/mumble.svg"); + svg.setScaledSize(QSize(size, size)); + QImage img = svg.read().convertToFormat(QImage::Format_Indexed8); + + QString png = QDir::temp().absoluteFilePath(QString::fromLatin1("mumble.%1.png").arg(size)); + + QImageWriter qiw(png); + qiw.write(img); + + qslImages << png; + } + QStringList args; + + args << qslImages; + args << QDir::current().absoluteFilePath("../../icons/mumble.ico"); + + qWarning() << args; + + QProcess qp; + qp.setProcessChannelMode(QProcess::ForwardedChannels); + qp.start("/usr/bin/convert", args); + if (! qp.waitForFinished()) + qWarning() << "No finish"; + foreach(const QString &png, qslImages) + QDir::temp().remove(png); +} diff --git a/src/tests/IconSync.pro b/src/tests/IconSync.pro new file mode 100644 index 000000000..f38ef3973 --- /dev/null +++ b/src/tests/IconSync.pro @@ -0,0 +1,8 @@ +include(../../compiler.pri) + +TEMPLATE =app +CONFIG += qt thread warn_on debug console +QT += network gui +LANGUAGE = C++ +TARGET = IconSync +SOURCES = IconSync.cpp |