using gm instead of imagemagick
now resizing and cropping images correctly