Skip to content

Commit ec69dab

Browse files
committed
Fix icons transparency
1 parent 51338e9 commit ec69dab

17 files changed

+13
-5
lines changed

scripts/gen-icons.sh

100644100755
Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ if [[ ! -f "ui/icons/io.github.rubiojr.whereami.svg" ]]; then
2222
exit 1
2323
fi
2424

25-
# Check if ImageMagick is available
26-
if ! command -v magick &> /dev/null; then
27-
echo -e "${RED}Error: ImageMagick 'magick' command not found. Please install ImageMagick.${NC}"
25+
# Check if Inkscape is available
26+
if ! command -v inkscape &> /dev/null; then
27+
echo -e "${RED}Error: Inkscape command not found. Please install Inkscape.${NC}"
2828
exit 1
2929
fi
3030

@@ -43,7 +43,11 @@ for size in "${SIZES[@]}"; do
4343
target_file="${target_dir}/${ICON_NAME}"
4444

4545
echo " ${size}x${size} -> ${target_file}"
46-
magick "${SVG_SOURCE}" -background transparent -resize "${size}x${size}" "${target_file}"
46+
inkscape "${SVG_SOURCE}" \
47+
--export-filename="${target_file}" \
48+
--export-width=${size} \
49+
--export-height=${size} \
50+
--export-background-opacity=0
4751
done
4852

4953
echo
@@ -60,7 +64,11 @@ for base_size in "${RETINA_BASE_SIZES[@]}"; do
6064
target_file="${target_dir}/${ICON_NAME}"
6165

6266
echo " ${base_size}x${base_size}@2 (${actual_size}x${actual_size}) -> ${target_file}"
63-
magick "${SVG_SOURCE}" -background transparent -resize "${actual_size}x${actual_size}" "${target_file}"
67+
inkscape "${SVG_SOURCE}" \
68+
--export-filename="${target_file}" \
69+
--export-width=${actual_size} \
70+
--export-height=${actual_size} \
71+
--export-background-opacity=0
6472
done
6573

6674
echo
-20.2 KB
Loading
-54.1 KB
Loading
-717 Bytes
Loading
-2.16 KB
Loading
-1.16 KB
Loading
-1.39 KB
Loading
-4.25 KB
Loading
-54.1 KB
Loading
-730 Bytes
Loading

0 commit comments

Comments
 (0)