Skip to content

Commit

Permalink
use gimp to compress the icon
Browse files Browse the repository at this point in the history
  • Loading branch information
mrbesen committed Feb 23, 2024
1 parent 7987260 commit 1803de6
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,6 @@ jobs:
name: cnping-exe
path: "*.exe"

- uses: actions/upload-artifact@v4
with:
name: cnping-icon
path: "cnping.ico"

- name: Build deb
run: debuild --no-sign

Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,3 @@ debian/cnping
debian/cnping.substvars
debian/debhelper-build-stamp
debian/files

cnping.ico
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,14 @@ updateicons : ${ICONSPATH}scalable/apps/${APPNAME}.svg
convert $^ -resize 256x256 ${ICONSPATH}256x256/apps/${APPNAME}.png
convert $^ -resize 1024x1024 ${ICONSPATH}1024x1024/apps/${APPNAME}.png

# after creating the ico file use GIMP to compress it:
# Image-> Mode -> Indexed...
# Choose "Generate optimum palette"
# Maximum number of colors: 3 (may change if the icon changes)
# "Convert"
# File -> Export As
# Check "Compressed (PNG)" in every resolution
# "Export"
cnping.ico: ${ICONSPATH}scalable/apps/${APPNAME}.svg
convert $^ -density 300 -define icon:auto-resize=128,32 -background none $@
convert $^ -density 300 -define icon:auto-resize=256,64,16 -background none $@

Binary file added cnping.ico
Binary file not shown.

0 comments on commit 1803de6

Please sign in to comment.