]> source.dussan.org Git - gitea.git/commitdiff
Generate small and large logos at 4x resolution (#2233)
authorsilverwind <me@silverwind.io>
Sun, 30 Jul 2017 20:04:01 +0000 (22:04 +0200)
committerLauris BH <lauris@nix.lv>
Sun, 30 Jul 2017 20:04:01 +0000 (23:04 +0300)
To support High-DPI displays, generate images at 4 times their displayed
resolution, which should be enough to support all current devices
according to https://material.io/devices/.

Makefile
public/img/gitea-lg.png
public/img/gitea-sm.png

index 23ac69080971deba565f034ee6015ff322e39a42..e4fe4595fa618ba15bd92f2e840348f8a49f7118 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -300,10 +300,10 @@ update-translations:
 .PHONY: generate-images
 generate-images:
        mkdir -p $(TMPDIR)/images
-       inkscape -f $(PWD)/assets/logo.svg -w 400 -h 400 -e $(PWD)/public/img/gitea-lg.png
-       inkscape -f $(PWD)/assets/logo.svg -w 30 -h 30 -jC -i layer1 -e $(TMPDIR)/images/30-1.png
-       inkscape -f $(PWD)/assets/logo.svg -w 30 -h 30 -jC -i layer2 -e $(TMPDIR)/images/30-2.png
-       composite -compose atop $(TMPDIR)/images/30-2.png $(TMPDIR)/images/30-1.png $(PWD)/public/img/gitea-sm.png
+       inkscape -f $(PWD)/assets/logo.svg -w 880 -h 880 -e $(PWD)/public/img/gitea-lg.png
+       inkscape -f $(PWD)/assets/logo.svg -w 120 -h 120 -jC -i layer1 -e $(TMPDIR)/images/sm-1.png
+       inkscape -f $(PWD)/assets/logo.svg -w 120 -h 120 -jC -i layer2 -e $(TMPDIR)/images/sm-2.png
+       composite -compose atop $(TMPDIR)/images/sm-2.png $(TMPDIR)/images/sm-1.png $(PWD)/public/img/gitea-sm.png
        inkscape -f $(PWD)/assets/logo.svg -w 200 -h 200 -e $(PWD)/public/img/avatar_default.png
        inkscape -f $(PWD)/assets/logo.svg -w 180 -h 180 -e $(PWD)/public/img/favicon.png
        inkscape -f $(PWD)/assets/logo.svg -w 128 -h 128 -e $(TMPDIR)/images/128-raw.png
index a1668228f6fc19604af2258bca56a8af3e284df0..1538cd1852b7674ddc70c042913cc4bfd05277a3 100644 (file)
Binary files a/public/img/gitea-lg.png and b/public/img/gitea-lg.png differ
index e1de122e7559b3305528631af6188f6023841cb5..05922cdbc859f570dcd3e07ea4d044d60c7a3263 100644 (file)
Binary files a/public/img/gitea-sm.png and b/public/img/gitea-sm.png differ