I'm trying to run the code bellow in the windows xp prompt:
"convert image.jpg -matte -virtual-pixel transparent -distort Perspective '0,0,0,0 0,262,0,262 240,0,240,37 240,262,240,237' result.png"
but I got this error:
convert: invalid argument for option '-distort ': '0,0,0,0, @ convert.c/ConvertImageCommand/1167
but in a linux server it runs perfect
exec("convert image.jpg -matte -virtual-pixel transparent -distort Perspective '0,0,0,0 0,262,0,262 240,0,240,37 240,262,240,237' result.png");
Perspective Distortion by command line doesn't works
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Perspective Distortion by command line doesn't works
See also IM Examples, APIs, Scripting, Building, Windows DOS Batch Scripts
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Perspective Distortion by command line doesn't works
I tryed it. Its working, but the result lost quality, and I need to add the paramter -unsharp 0x1 to the result be a few better.
Do you know if there are another way to save with a better quality ? because -unsharp 0x1 is not so good.
Do you know if there are another way to save with a better quality ? because -unsharp 0x1 is not so good.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Perspective Distortion by command line doesn't works
By default -distort perspective uses elliptically weighted area filtering to avoid aliasing artifacts. But you can use other filters using the -filter setting. To turn off filtering use -filter point. To use the best non-area filter, try -filter lanczos.
See
http://www.imagemagick.org/script/comma ... php#filter
http://www.imagemagick.org/Usage/resize/#filter
http://www.imagemagick.org/Usage/distorts/#distort
See
http://www.imagemagick.org/script/comma ... php#filter
http://www.imagemagick.org/Usage/resize/#filter
http://www.imagemagick.org/Usage/distorts/#distort