Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Feb 2002 18:23:31 GMT
From:      Alex Hayward <xelah@xelah.com>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/34734: There is no pngquant port
Message-ID:  <200202081823.g18INV698827@telford.tecc.co.uk>

next in thread | raw e-mail | index | archive | help

>Number:         34734
>Category:       ports
>Synopsis:       There is no pngquant port
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Feb 08 10:20:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Alex Hayward
>Release:        FreeBSD 4.4-STABLE i386
>Organization:
TECC Ltd
>Environment:
System: FreeBSD telford.tecc.co.uk 4.4-STABLE FreeBSD 4.4-STABLE #1: Mon Nov 5 10:09:10 GMT 2001 alex@telford.tecc.co.uk:/compile/usr.obj/compile/usr.src/sys/TELFORD i386


	
>Description:
There is not pngquant port in /usr/ports.

pngquant converts 32-bit RGBA PNGs into 8-bit RGBA-palette PNGs.
>How-To-Repeat:
$ cd /usr/ports/graphics/pngquant
bash: cd: /usr/ports/graphics/pngquant: No such file or directory
>Fix:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	graphics/pngquant
#	graphics/pngquant/files
#	graphics/pngquant/files/patch-aa
#	graphics/pngquant/pkg-plist
#	graphics/pngquant/pkg-descr
#	graphics/pngquant/pkg-comment
#	graphics/pngquant/distinfo
#	graphics/pngquant/Makefile
#
echo c - graphics/pngquant
mkdir -p graphics/pngquant > /dev/null 2>&1
echo c - graphics/pngquant/files
mkdir -p graphics/pngquant/files > /dev/null 2>&1
echo x - graphics/pngquant/files/patch-aa
sed 's/^X//' >graphics/pngquant/files/patch-aa << 'END-of-graphics/pngquant/files/patch-aa'
X--- Makefile.unx.orig	Fri Feb  8 17:55:47 2002
X+++ Makefile.unx	Fri Feb  8 17:57:53 2002
X@@ -1,13 +1,14 @@
X # Makefile for pngquant
X # GRR 20001222
X 
X-CC=gcc
X+CC?=gcc
X+LD=$(CC)
X 
X-PNGINC = ../libpng
X-PNGLIB = ../libpng
X+PNGINC = /usr/local/include
X+PNGLIB = /usr/local/lib
X 
X-ZINC = ../zlib
X-ZLIB = ../zlib
X+ZINC = /usr/include
X+ZLIB = /usr/lib
X 
X CFLAGS = -O3 -Wall -I. -I$(PNGINC) -I$(ZINC)
X #LDFLAGS = -L$(PNGLIB) -lpng -L$(ZLIB) -lz -lm
END-of-graphics/pngquant/files/patch-aa
echo x - graphics/pngquant/pkg-plist
sed 's/^X//' >graphics/pngquant/pkg-plist << 'END-of-graphics/pngquant/pkg-plist'
Xbin/pngquant
X%%PORTDOCS%%share/doc/pngquant/CHANGELOG
X%%PORTDOCS%%share/doc/pngquant/README
X%%PORTDOCS%%@dirrm share/doc/pngquant
END-of-graphics/pngquant/pkg-plist
echo x - graphics/pngquant/pkg-descr
sed 's/^X//' >graphics/pngquant/pkg-descr << 'END-of-graphics/pngquant/pkg-descr'
Xpngquant is a simple tool with one purpose:  convert 32-bit RGBA PNGs into
X8-bit RGBA-palette PNGs (or fewer than 8 bits, if you want), via quantization
Xand either ordered or diffusion (Floyd-Steinberg) dithering.  The fact that
Xyou can also use it on RGB or even palette images (e.g., to further color-
Xreduce them to 16 colors or whatever) is just a nice little bonus.
X 
XThe current version is fully functional in the sense that it can do:
X 
X - nice reduction of all PNG image types to 256-color (or smaller) palette
X - automatic optimization of tRNS chunks
X - batch conversion of multiple files (e.g., "pngquant 256 *.png")
X - Unix-style command-line filtering (e.g., "... | pngquant 16 | ...")
X 
X...on at least Unix and Win32.  It should be pretty easy to port to almost
Xany other platform with a command-line interface and unstructured (stream-
Xoriented) files, including VMS but probably not VM or MVS.
X 
XIt does still lack a few features:
X 
X - no ancillary chunk preservation (except gAMA)
X - no preservation of significant-bits info after rescaling (sBIT chunk)
X - no mapfile support
X - no "native" handling of 16-bit-per-sample files or gray+alpha files
X    (i.e., all samples are truncated to 8 bits and all images are promoted
X    to RGBA before quantization)
X 
XThese issues will be addressed in a post-1.0 release.
X 
XBy the way, be sure to check "before" and "after" file sizes, preferably with
Xpngcrush (http://pmt.sourceforge.net/pngcrush/); dithered palette images may
Xbe four times smaller to begin with, but they don't compress nearly as well
Xas grayscale and truecolor images.  Some images, such as Henri Sivonen's alpha
Xbutton (http://www.pp.htv.fi/hsivone1/css-test/bitmapstyle.html), can be made
Xsmaller as full 32-bit RGBA images (4076 bytes in this case) than as either
XFS-dithered palette (4550 bytes) or ordered-dither palette (4482 bytes) images.
X 
XSee http://www.libpng.org/pub/png/apps/pngquant.html for updates and links
Xto compiled binaries for various platforms.
X 
XGreg Roelofs
Xnewt@pobox.com
END-of-graphics/pngquant/pkg-descr
echo x - graphics/pngquant/pkg-comment
sed 's/^X//' >graphics/pngquant/pkg-comment << 'END-of-graphics/pngquant/pkg-comment'
Xconvert 32-bit RGBA PNGs into 8-bit RGBA-palette PNGs
END-of-graphics/pngquant/pkg-comment
echo x - graphics/pngquant/distinfo
sed 's/^X//' >graphics/pngquant/distinfo << 'END-of-graphics/pngquant/distinfo'
XMD5 (pngquant-0.95-src.tar.gz) = 2b4dadff5470e014904ec3d84ee00c0a
END-of-graphics/pngquant/distinfo
echo x - graphics/pngquant/Makefile
sed 's/^X//' >graphics/pngquant/Makefile << 'END-of-graphics/pngquant/Makefile'
X# New ports collection makefile for:	pngcquant
X# Date created:				Fri 08 Feb 2002
X#
X# $FreeBSD: ports/graphics/pngcheck/Makefile,v 1.4 2001/12/24 02:15:46 pat Exp $
X#
X
XPORTNAME=	pngquant
XPORTVERSION=	0.95
XCATEGORIES=	graphics
XMASTER_SITES=	http://www.libpng.org/pub/png/src/ \
X		ftp://ftp.libpng.org/pub/png/src/ \
X		ftp://swrinde.nde.swri.edu/pub/png/applications/
X
XDISTFILES=pngquant-0.95-src.tar.gz
X
XMAINTAINER=	ports@FreeBSD.org
X
XMAKEFILE=	Makefile.unx
X
XLIB_DEPENDS=	png.5:${PORTSDIR}/graphics/png
X
Xdo-install:
X	${INSTALL_PROGRAM} ${WRKSRC}/pngquant ${PREFIX}/bin
X.if !defined(NOPORTDOCS)
X	@${MKDIR} ${DOCSDIR}
X	@${INSTALL_DATA} ${WRKSRC}/CHANGELOG ${DOCSDIR}
X	@${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
X.endif
X
X.include <bsd.port.mk>
END-of-graphics/pngquant/Makefile
exit

>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200202081823.g18INV698827>