ImageMagick Command-Line Option Order (and Categories of Command-Line Parameters)

后端 未结 2 1971
醉话见心
醉话见心 2020-12-01 20:15

My supervisor has asked me to convert the parts of our Perl scripts that use PerlMagick to instead pipe and use the command line version of ImageMagick (for various unrelate

2条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-01 20:52

    Are convert operations performed from left to right? ie the order I pass them

    Yes. If I take the following two examples, which are identical except for the operations order, I can expect different results based on the left to right.

    convert rose: -sample 300% -wave 5x10 rose_post_wave.png
    convert rose: -wave 5x10 -sample 300% rose_pre_wave.png
    

    You can see the effects of the wave operation impact the image after, or before the sampling of the image.

    rose post wave rose pre wave

    What happens if I pass the same option twice? Are they performed separately?

    The will be executed twice. No special locking, or automatic operation counting exists.

    convert rose: -blur 0.5x0.5 -scale 300% rose_blur1.png
    convert rose: -blur 0.5x0.5 -blur 0.5x0.5 -scale 300% rose_blur2.png
    

    one blur two blur

提交回复
热议问题