summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile15
-rw-r--r--pngtoico.141
2 files changed, 55 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 13d7e91..3e69c31 100644
--- a/Makefile
+++ b/Makefile
@@ -14,10 +14,19 @@
## Makefile for pngtoico
##
+INSTALLROOT =
+prefix = /usr
+bindir = $(prefix)/bin
+mandir = $(prefix)/man
+man1dir = $(mandir)/man1
+
CC = gcc -W -Wall
CFLAGS = -O2 -fomit-frame-pointer
LDFLAGS = -s
LIBS = -lpng
+INSTALL = install
+INSTALL_EXEC = $(INSTALL) -c -m 755
+INSTALL_DATA = $(INSTALL) -c -m 644
all: pngtoico
@@ -27,6 +36,10 @@ clean:
distclean spotless: clean
rm -f *~ \#*
+install: all
+ mkdir -p $(INSTALLROOT)$(bindir) $(INSTALLROOT)$(man1dir)
+ $(INSTALL_EXEC) pngtoico $(INSTALLROOT)$(bindir)
+ $(INSTALL_DATA) pngtoico.1 $(INSTALLROOT)$(man1dir)
+
pngtoico: pngtoico.c
$(CC) $(CFLAGS) $(LDFLAGS) -o pngtoico pngtoico.c $(LIBS)
-
diff --git a/pngtoico.1 b/pngtoico.1
new file mode 100644
index 0000000..c574492
--- /dev/null
+++ b/pngtoico.1
@@ -0,0 +1,41 @@
+.\" $Id$
+.\" -----------------------------------------------------------------------
+.\"
+.\" Copyright 2002 H. Peter Anvin - All Rights Reserved
+.\"
+.\" This program is free software; you can redistribute it and/or modify
+.\" it under the terms of the GNU General Public License as published by
+.\" the Free Software Foundation, Inc., 53 Temple Place Ste 330,
+.\" Bostom MA 02111-1307, USA; either version 2 of the License, or
+.\" (at your option) any later version; incorporated herein by reference.
+.\"
+.\" -----------------------------------------------------------------------
+.TH PNGTOICO 1 "1 January 2002" "pngtoico 1.0"
+.SH NAME
+.B pngtoico
+\- convert png images to M$ ico format
+.SH SYNOPSIS
+.B pngtoico
+.I files.png...
+>
+.I output.ico
+.SH DESCRIPTION
+.B pngtoico
+converts a set of palettized (indexed) Portable Network Graphics (PNG)
+files to a single Micro$oft icon (ICO) file.
+.PP
+Each input PNG image should be no larger than 255x255 pixels, and use
+no more than 256 colours. Fully transparent pixels are allowed;
+partially transparent pixels (alpha blending) are not.
+.SH NOTES
+Although the ICO format is getting used on the web as a "favourites
+icon" format, it is actually very ill-suited for that purpose. Using
+a <LINK> tag, PNG images can usually be specified instead. The use of
+PNG images is recommended.
+.SH BUGS
+The ICO format is space-consuming and full of limitations.
+.SH AUTHOR
+H. Peter Anvin <hpa@zytor.com>
+.SH "SEE ALSO"
+.BR png (5).
+