added imagemagick based resizing