Category Archives: png

OptiPNG Ant Task

>OptiPNG is a tool for optimizing PNG images. And now, there’s an Ant task for executing it from an Ant build file:

Mini-HOWTO for Linux/UNIX/Mac OS X systems, assuming you already have Apache Ant installed:

  1. download OptiPNG source code from SourceForge (TAR GZ file)
  2. execute: ./configure
  3. execute: make
  4. execute: sudo make install
    (enter your password if required); the command optipng is now installed in /usr/local/bin/
  5. download the optipng-ant-task source code from – take the latest version available (you can choose between a ZIP and a TAR GZ file)
  6. unpack the download file, this will create a new directory with an odd name like: znerd-optipng-ant-task-604de975b4cc4a1a2766e385c91b749318af038e (you may want to rename it to optipng-ant-task or so)
  7. in that directory, execute: ant
    this will compile the classes, run the available unit test and build the JAR file

Then you can use the Ant task from your own build file, for example as follows:

<taskdef name="optipng" classname="com.pensioenpage.jynx.optipng.OptiPNGTask" classpath="lib/optipng-ant-task.jar" />
<optipng dir="src/htdocs" todir="build/htdocs" />

Leave a comment

Posted by on 8 September 2009 in ant, optipng, png, task, taskdef


>Opacity 1.1 released


If you’re creating iconic graphics, either for desktop applications, mobile apps or the web, and you’re lucky to be using Mac OS X 10.5 (Leopard), then Opacity is definitely a contender for creating those nifty looking images.

Opacity is simple, intuitive but still very powerful when it comes to creating small graphics. It supports layers, different kinds of shapes, all sorts of effects and integrates with a couple of FTP programs.

The user interface works mostly consistent with the rest of Leopard.

Have a look at the screencast on their site.

Leave a comment

Posted by on 7 May 2008 in apple, graphics, leopard, mac, macos, macosx, png, web design


>Compiling zlib, libpng and pngquant on Mac OS X (updated)


Here are some instructions for compiling pngquant on Mac OS X. Included are instructions for compiling libpng (which is a dependency for pngquant) and zlib (which is a dependency for libpng).

Step 1. First, download pngquant from SourceForge:

as well as libpng and zlib:

Step 2. Unpack them all in the same directory and then generate symbolic links called libpng and zlib that point to the actual directories. E.g.:

total 16
lrwxr-xr-x 1 ernst ernst 13 Apr 29 19:27 libpng -> libpng-1.2.27
drwxr-xr-x 103 ernst ernst 3502 Apr 29 19:28 libpng-1.2.27
drwxr-xr-x 10 ernst ernst 340 Apr 29 19:18 pngquant-1.0
lrwxr-xr-x 1 ernst ernst 10 Apr 29 19:27 zlib -> zlib-1.2.3
drwxr-xr-x 64 ernst ernst 2176 Apr 29 19:22 zlib-1.2.3

Step 3. Now go to the zlib directory and execute ./configure followed by make.

Step 4. Go to the libpng directory and execute make -f scripts/makefile.darwin.

Step 5. Go to the directory that contains the pngquant source code and execute make -f Makefile.unx.

That’s it. You should now have a pngquant executable.

Updated (April 30, 2008): On request, here’s a link to the resulting executable: pngquant (for Mac OS X). MD5 checksum is 20820366a7fffc6305ada6b727656b7b.

1 Comment

Posted by on 29 April 2008 in cc, compilation, compile, libpng, mac, macos, macosx, make, png, pngquant, zlib