3 changed files with 43 additions and 54 deletions
@ -1,21 +0,0 @@ |
|||||||
Index: Makefile
|
|
||||||
--- Makefile.orig 2002-12-07 23:49:52 +0100
|
|
||||||
+++ Makefile 2006-04-03 20:34:11 +0200
|
|
||||||
@@ -1,11 +1,13 @@
|
|
||||||
-CPPFLAGS=-W -Wall -O2 -finline-functions
|
|
||||||
-#CPPFLAGS=-O0 -W -Wall
|
|
||||||
-DEBUG=-g
|
|
||||||
+CC = g++
|
|
||||||
+CFLAGS = -Wall
|
|
||||||
+CPPFLAGS =
|
|
||||||
+LDFLAGS =
|
|
||||||
+LIBS = -lpng -lz -lm
|
|
||||||
|
|
||||||
all: png2ico
|
|
||||||
|
|
||||||
png2ico: png2ico.cpp
|
|
||||||
- g++ $(CPPFLAGS) $(DEBUG) -o $@ $< -lpng -lz -lm
|
|
||||||
+ $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $< $(LDFLAGS) $(LIBS)
|
|
||||||
|
|
||||||
doc/png2ico.txt: doc/png2ico.1
|
|
||||||
man $< |sed -e $$'s/.\b\\(.\\)/\\1/g' -e 's/\(.*\)/\1'$$'\r/' >$@
|
|
||||||
@ -0,0 +1,30 @@ |
|||||||
|
#!/bin/sh |
||||||
|
## |
||||||
|
## png2ico.sh -- PNG to ICO(N) format conversion with ImageMagick |
||||||
|
## Copyright (c) 2014 Ralf S. Engelschall <rse@engelschall.com> |
||||||
|
## |
||||||
|
## See Also: |
||||||
|
## - http://en.wikipedia.org/wiki/ICO_%28file_format%29 |
||||||
|
## - http://en.wikipedia.org/wiki/Favicon |
||||||
|
## |
||||||
|
|
||||||
|
# sanity check usage |
||||||
|
if [ $# -ne 2 ]; then |
||||||
|
echo "USAGE: png2ico <name>.{png|gif|...} <name>.ico" 1>&2 |
||||||
|
exit 1 |
||||||
|
fi |
||||||
|
|
||||||
|
# run ImageMagick to perform the conversion |
||||||
|
exec @l_prefix@/bin/convert \ |
||||||
|
"$1" \ |
||||||
|
-background transparent \ |
||||||
|
-bordercolor transparent \ |
||||||
|
-border 0 \ |
||||||
|
-colors 256 \ |
||||||
|
\( -clone 0 -resize x16 -gravity center -crop 16x16+0+0\! -flatten \) \ |
||||||
|
\( -clone 0 -resize x32 -gravity center -crop 32x32+0+0\! -flatten \) \ |
||||||
|
\( -clone 0 -resize x48 -gravity center -crop 48x48+0+0\! -flatten \) \ |
||||||
|
\( -clone 0 -resize x64 -gravity center -crop 64x64+0+0\! -flatten \) \ |
||||||
|
-delete 0 \ |
||||||
|
"$2" |
||||||
|
|
||||||
Loading…
Reference in new issue