#!/bin/bash
# identify guts-014.png
# guts-014.png PNG 2469x3422 2469x3422+0+0 8-bit sRGB 1900060B 0.000u 0:00.000
# identify P-075.png
# P-075.png PNG 3109x2113 3109x2113+0+0 8-bit sRGB 1.10411MiB 0.000u 0:00.000
f="P-075.png"
PX="7"
X="3109"
Y="2113"
ANGLETAN=`echo "scale=7;pi=4*a(1);a(${PX}/${Y})/pi*180"|bc -l`
echo "shearing $f from 0 pixels at top to ${PX} pixels (to the right) at the bottom. angle = $ANGLETAN"
pngtopnm < $f | pnmshear -noantialias $ANGLETAN | pnmtopng > sheared.png

