[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-windows
Subject: Re: Review Request 129807: proposal: add ksvg2ico
From: René J.V. Bertin <rjvbertin () gmail ! com>
Date: 2017-01-13 20:21:47
Message-ID: 20170113202147.32006.32520 () mimi ! kde ! org
[Download RAW message or body]
--===============2706412640929820041==
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/129807/
-----------------------------------------------------------
(Updated Jan. 13, 2017, 9:21 p.m.)
Review request for KDE Frameworks, kdewin, Alex Merry, Christoph Feck, and Hannah von \
Reth.
Changes
-------
CMake file cleanup and Description update.
Repository: kiconthemes
Description (updated)
-------
Recently I committed a few changes to `ecm_add_app_icon` that make use of the fact \
that KIconThemes includes a `ksvg2icns` utility, making it possible to generate an \
application icon from an SVG file instead of from a series of PNG files.
With the present patch I propose to add an updated and extensively rewritten version \
of the ageing `svg2ico` tool from the KDEWin project to KIconThemes. The goal is to \
have a proper and up-to-date tool to generate application icons from SVG on MS \
Windows too. This new version (named `ksvg2ico` in line with `ksvg2icns`) is a \
standalone tool that combines SVG - PNG conversion with PNG - ICO conversion. More \
accurately: it renders SVG files to an internal bitmap and then saves those bitmaps \
(as BMP?) to the .ico file.
- it now handles sizes up to 256x256, in part thanks to syncing `QtIcoHandler` with \
the version from Qt 5.6 .
- for that it uses a private copy of that class, with the unused read support \
disabled. Using Qt's internal version through `QImageWriter` isn't possible because \
that class doesn't yet support writing multiple images to a single \
file.
- a `--rcfile` option is provided, copied from `png2ico`.
- the PNG files are still saved and are left for debugging when `--debug` is given.
I considered proposing it to KDEWin instead, but in the end I liked the idea better \
to provide icon conversion utilities for Mac and Windows with a framework, where they \
might also serve in a less KDE-centric context (and cross-platform development).
Diffs (updated)
-----
src/CMakeLists.txt efba9e6
src/tools/ksvg2ico/CMakeLists.txt PRE-CREATION
src/tools/ksvg2ico/ksvg2ico.cpp PRE-CREATION
src/tools/ksvg2ico/qicohandler.h PRE-CREATION
src/tools/ksvg2ico/qicohandler.cpp PRE-CREATION
Diff: https://git.reviewboard.kde.org/r/129807/diff/
Testing (updated)
-------
On Mac OS X 10.9 and Linux with Qt 5.7.1 and KF5 5.29.0 .
File Attachments
----------------
.ico file generated from sc-apps-calligrakarbon.svgz using ksvg2ico with Benkmann's \
png2ico https://git.reviewboard.kde.org/media/uploaded/files/2017/01/11/aa0973dc-1be8-4d36-82dc-8f7baa053fee__apps-calligrakarbon.ico
.ico created by icotool from *-apps-calligrakarbon.png
https://git.reviewboard.kde.org/media/uploaded/files/2017/01/12/3bbee1f5-6770-4d6e-847d-e32c7e5d3fe1__icotool-apps-calligrakarbon.png
ico file generated by the standalone ksvg2ico
https://git.reviewboard.kde.org/media/uploaded/files/2017/01/12/7b286997-3100-47d0-800e-acb56ee9c68f__apps-calligrakarbon.ico
Thanks,
René J.V. Bertin
--===============2706412640929820041==
MIME-Version: 1.0
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: 8bit
<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 \
solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;"> \
<tr> <td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/129807/">https://git.reviewboard.kde.org/r/129807/</a>
</td>
</tr>
</table>
<br />
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: \
1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; \
-webkit-border-radius: 6px;"> <tr>
<td>
<div>Review request for KDE Frameworks, kdewin, Alex Merry, Christoph Feck, and \
Hannah von Reth.</div> <div>By René J.V. Bertin.</div>
<p style="color: grey;"><i>Updated Jan. 13, 2017, 9:21 p.m.</i></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Changes</h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">CMake file cleanup and Description update.</p></pre> \
</td> </tr>
</table>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
kiconthemes
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description \
(updated)</h1> <table width="100%" bgcolor="#ffffff" cellspacing="0" \
cellpadding="10" style="border: 1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">Recently I committed a few changes to <code \
style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: \
0;line-height: inherit;">ecm_add_app_icon</code> that make use of the fact that \
KIconThemes includes a <code style="text-rendering: inherit;color: #4444cc;padding: \
0;white-space: normal;margin: 0;line-height: inherit;">ksvg2icns</code> utility, \
making it possible to generate an application icon from an SVG file instead of from a \
series of PNG files. </p> <p style="padding: 0;text-rendering: inherit;margin: \
0;line-height: inherit;white-space: inherit;">With the present patch I propose to add \
an updated and extensively rewritten version of the ageing <code \
style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: \
0;line-height: inherit;">svg2ico</code> tool from the KDEWin project to KIconThemes. \
The goal is to have a proper and up-to-date tool to generate application icons from \
SVG on MS Windows too. This new version (named <code style="text-rendering: \
inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: \
inherit;">ksvg2ico</code> in line with <code style="text-rendering: inherit;color: \
#4444cc;padding: 0;white-space: normal;margin: 0;line-height: \
inherit;">ksvg2icns</code>) is a standalone tool that combines SVG - PNG conversion \
with PNG - ICO conversion. More accurately: it renders SVG files to an internal \
bitmap and then saves those bitmaps (as BMP?) to the .ico file.</p> <ul \
style="padding: 0;text-rendering: inherit;margin: 0 0 0 1em;line-height: \
inherit;white-space: normal;"> <li style="padding: 0;text-rendering: inherit;margin: \
0;line-height: inherit;white-space: normal;">it now handles sizes up to 256x256, in \
part thanks to syncing <code style="text-rendering: inherit;color: #4444cc;padding: \
0;white-space: normal;margin: 0;line-height: inherit;">QtIcoHandler</code> with the \
version from Qt 5.6 .</li> <li style="padding: 0;text-rendering: inherit;margin: \
0;line-height: inherit;white-space: normal;">for that it uses a private copy of that \
class, with the unused read support disabled. Using Qt's internal version through \
<code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: \
normal;margin: 0;line-height: inherit;">QImageWriter</code> isn't possible because \
that class doesn't yet support writing multiple images to a single file.</li> <li \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
normal;">a <code style="text-rendering: inherit;color: #4444cc;padding: \
0;white-space: normal;margin: 0;line-height: inherit;">--rcfile</code> option is \
provided, copied from <code style="text-rendering: inherit;color: #4444cc;padding: \
0;white-space: normal;margin: 0;line-height: inherit;">png2ico</code>.</li> <li \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
normal;">the PNG files are still saved and are left for debugging when <code \
style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: \
0;line-height: inherit;">--debug</code> is given.</li> </ul>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">I considered proposing it to KDEWin instead, but in \
the end I liked the idea better to provide icon conversion utilities for Mac and \
Windows with a framework, where they might also serve in a less KDE-centric context \
(and cross-platform development).</p></pre> </td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing \
(updated)</h1> <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">On Mac OS X 10.9 and Linux with Qt 5.7.1 and KF5 \
5.29.0 .</p></pre> </td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> \
(updated)</h1> <ul style="margin-left: 3em; padding-left: 0;">
<li>src/CMakeLists.txt <span style="color: grey">(efba9e6)</span></li>
<li>src/tools/ksvg2ico/CMakeLists.txt <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>src/tools/ksvg2ico/ksvg2ico.cpp <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>src/tools/ksvg2ico/qicohandler.h <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>src/tools/ksvg2ico/qicohandler.cpp <span style="color: \
grey">(PRE-CREATION)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/129807/diff/" style="margin-left: \
3em;">View Diff</a></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">File Attachments \
</h1>
<li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2017/01/11/aa0973dc-1be8-4d36-82dc-8f7baa053fee__apps-calligrakarbon.ico">.ico \
file generated from sc-apps-calligrakarbon.svgz using ksvg2ico with Benkmann's \
png2ico</a></li>
<li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2017/01/12/3bbee1f5-6770-4d6e-847d-e32c7e5d3fe1__icotool-apps-calligrakarbon.png">.ico \
created by icotool from *-apps-calligrakarbon.png</a></li>
<li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2017/01/12/7b286997-3100-47d0-800e-acb56ee9c68f__apps-calligrakarbon.ico">ico \
file generated by the standalone ksvg2ico</a></li>
</ul>
</td>
</tr>
</table>
</div>
</body>
</html>
--===============2706412640929820041==--
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic