I've noticed strange behaviour when using -extent which I have worked-around using -define distort:viewport. This is the line I use which produces an unwanted result:
Code: Select all
convert input.jpg `( -clone 0 -gamma 0 -fill white -stroke white -draw "polygon 2347,1536 3648,3789 3648,0 2347,0" `) -alpha off -compose CopyOpacity -composite -virtual-pixel transparent -extent 3648x5472+523-1200 +repage .\output.png
Code: Select all
convert input.JPG `( -clone 0 -gamma 0 -fill white -stroke white -draw "polygon 2347,1536 3648,3789 3648,0 2347,0" `) -alpha off -compose CopyOpacity -composite -virtual-pixel transparent -define distort:viewport=3648x5472+523-1200 -filter point -distort srt 0 +repage .\output.png
My two questions are, why does the distort viewport option work, but the extent option not; and why does the extent option not work "in-line" but does does work when saved to disk and reloaded?
This example works with a jpeg made like this:
Code: Select all
convert -size 3648x5472 xc:red input.jpg