0

whenever we apply some transformation using imagemagick convert command , it tries to ensure that the resulting image is of the same size as that of the original image . is there a way such that we get the whole rendered image with transparent/white background .

convert -verbose maanavulu_GIST-TLOTKrishna.tif \
        -alpha set -matte -virtual-pixel transparent \
        -distort perspective-projection '1.06,0,0.0,0,2.066,0.0,0.0,0.0' \
        1.jpg
emcconville
  • 23,800
  • 4
  • 50
  • 66
Deepesh
  • 99
  • 2
  • 11

1 Answers1

0

There's some tricks with fx & repage hinted at by the Distorting Usage documentation. I've found the easiest approach would be to set option:distort:viewport option to something large enough to capture the whole distortion, then -trim it to the finial size.

convert -verbose maanavulu_GIST-TLOTKrishna.tif \
       -alpha set -matte -virtual-pixel transparent \
       -set option:distort:viewport 1000x1000 \
       -distort perspective-projection '1.06,0,0.0,0,2.066,0.0,0.0,0.0' \
       -trim 1.jpg
emcconville
  • 23,800
  • 4
  • 50
  • 66