#!/bin/sh # For use in the pngzop project # Copyright 2013 by Glenn Randers-Pehrson # Released under the pngcrush license (equivalent to the libpng license) # Extracts and decompresses the data from the IDAT chunks in a set of # PNG files. for x in $* do case $1 in *.png) root=`echo $1 | sed -e "s/.png$//"` pngidat.exe < $1 | zpipe -d > $root.idat ;; *.zdat) root=`echo $1 | sed -e "s/.zdat$//"` zpipe -d < $1 > $root.idat ;; esac shift done