diff options
author | Samuel Mannehed <samuel@cendio.se> | 2022-12-22 16:14:11 +0100 |
---|---|---|
committer | Samuel Mannehed <samuel@cendio.se> | 2022-12-23 09:05:12 +0100 |
commit | 139f087187b7b9b385d016be561e5b0bf3661a37 (patch) | |
tree | ce1b771c73a0d9a2c361a87181c2257c854b130d | |
parent | 416e21151b5b084a07d9f32442a98af445a35fa9 (diff) | |
download | novnc-139f087187b7b9b385d016be561e5b0bf3661a37.tar.gz |
Explicitly specify icon size instead of density
Instead of calculating a density that we hope results in the correct
size, we can specify what size we want. This is more robust and easier
to understand. This also allows us to simplify the Makefile quite a bit.
Note that Fedora's packaging of ImageMagick has a bug here:
https://bugzilla.redhat.com/show_bug.cgi?id=2140018
-rw-r--r-- | app/images/icons/Makefile | 21 | ||||
-rw-r--r-- | app/images/icons/novnc-144.png | bin | 4582 -> 4583 bytes | |||
-rw-r--r-- | app/images/icons/novnc-16.png | bin | 675 -> 648 bytes | |||
-rw-r--r-- | app/images/icons/novnc-192.png | bin | 5787 -> 5754 bytes | |||
-rw-r--r-- | app/images/icons/novnc-24.png | bin | 1000 -> 967 bytes | |||
-rw-r--r-- | app/images/icons/novnc-32.png | bin | 1064 -> 1023 bytes | |||
-rw-r--r-- | app/images/icons/novnc-48.png | bin | 1397 -> 1370 bytes | |||
-rw-r--r-- | app/images/icons/novnc-64.png | bin | 1946 -> 1917 bytes | |||
-rw-r--r-- | app/images/icons/novnc-72.png | bin | 2699 -> 2684 bytes | |||
-rw-r--r-- | app/images/icons/novnc-96.png | bin | 2351 -> 3104 bytes |
10 files changed, 8 insertions, 13 deletions
diff --git a/app/images/icons/Makefile b/app/images/icons/Makefile index 7f53b0a..83218e1 100644 --- a/app/images/icons/Makefile +++ b/app/images/icons/Makefile @@ -13,23 +13,18 @@ ALL_ICONS := \ all: $(ALL_ICONS) -novnc-16.png: novnc-icon-sm.svg - convert -density 90 \ - -background transparent "$<" "$@" -novnc-24.png: novnc-icon-sm.svg - convert -density 135 \ - -background transparent "$<" "$@" -novnc-32.png: novnc-icon-sm.svg - convert -density 180 \ - -background transparent "$<" "$@" - +# General conversion novnc-%.png: novnc-icon.svg - convert -density $$[`echo $*` * 90 / 48] \ - -background transparent "$<" "$@" + convert -depth 8 -background transparent \ + -size $*x$* "$(lastword $^)" "$@" +# iOS icons use their own SVG novnc-ios-%.png: novnc-ios-icon.svg convert -depth 8 -background transparent \ - -size $*x$* "$<" "$@" + -size $*x$* "$(lastword $^)" "$@" + +# The smallest sizes are generated using a different SVG +novnc-16.png novnc-24.png novnc-32.png: novnc-icon-sm.svg clean: rm -f *.png diff --git a/app/images/icons/novnc-144.png b/app/images/icons/novnc-144.png Binary files differindex eee71f1..1707e33 100644 --- a/app/images/icons/novnc-144.png +++ b/app/images/icons/novnc-144.png diff --git a/app/images/icons/novnc-16.png b/app/images/icons/novnc-16.png Binary files differindex 42108f4..d4e2928 100644 --- a/app/images/icons/novnc-16.png +++ b/app/images/icons/novnc-16.png diff --git a/app/images/icons/novnc-192.png b/app/images/icons/novnc-192.png Binary files differindex ef9201f..8c582b4 100644 --- a/app/images/icons/novnc-192.png +++ b/app/images/icons/novnc-192.png diff --git a/app/images/icons/novnc-24.png b/app/images/icons/novnc-24.png Binary files differindex 1106135..ee316e1 100644 --- a/app/images/icons/novnc-24.png +++ b/app/images/icons/novnc-24.png diff --git a/app/images/icons/novnc-32.png b/app/images/icons/novnc-32.png Binary files differindex ff00dc3..6d9182a 100644 --- a/app/images/icons/novnc-32.png +++ b/app/images/icons/novnc-32.png diff --git a/app/images/icons/novnc-48.png b/app/images/icons/novnc-48.png Binary files differindex f24cd6c..631a9bd 100644 --- a/app/images/icons/novnc-48.png +++ b/app/images/icons/novnc-48.png diff --git a/app/images/icons/novnc-64.png b/app/images/icons/novnc-64.png Binary files differindex 6d0fb34..98375f8 100644 --- a/app/images/icons/novnc-64.png +++ b/app/images/icons/novnc-64.png diff --git a/app/images/icons/novnc-72.png b/app/images/icons/novnc-72.png Binary files differindex 23163a2..26e4fba 100644 --- a/app/images/icons/novnc-72.png +++ b/app/images/icons/novnc-72.png diff --git a/app/images/icons/novnc-96.png b/app/images/icons/novnc-96.png Binary files differindex 1a77c53..102e8a6 100644 --- a/app/images/icons/novnc-96.png +++ b/app/images/icons/novnc-96.png |