Hi,
I need to use ImageMagick to create a motion blur which should be almost identical to the effect in Paint.NET
Eg.
Although I'm having a bit of a problem. I'm using the following command except it blurs the entire image and not the region, plus I've tried playing with the options but I can't get it it to render anything similar to the effect in Paint.NET.
convert -motion-blur 0x50+335 -region 100x100 test.jpg test.jpg
Motion Blur
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Motion Blur
try -region 100x100+0+0
also note that IM motion blur is not symmetric. See http://www.fmwconcepts.com/imagemagick/ ... onvolution
also note that IM motion blur is not symmetric. See http://www.fmwconcepts.com/imagemagick/ ... onvolution
Re: Motion Blur
+0+0 also blurs the entire image.
convert -motion-blur 0x50+335 -region 100x100+0+0 test.jpg test.jpg
convert -motion-blur 0x50+335 -region 100x100+0+0 test.jpg test.jpg
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Motion Blur
what version of IM are you using? the following works for me on 6.4.2-5 Q16
convert logo: -region 55x55+430+90 -motion-blur 20x65535+45 tmp.png
does a 20 pixel asymmetric linear blur of the region around the big star on the hat at a 45 degree angle
convert logo: -region 55x55+430+90 -motion-blur 0x20+45 tmp1.png
does an asymmetric gaussian blur
Note:
1) convert syntax usually needs the input image right after "convert"
2) It also looks like -region needs to be specified right after the input as when I do
convert logo: -motion-blur 10x65535 -region 40x40+120+50 tmp2.png
it blurs the whole image.
convert logo: -region 55x55+430+90 -motion-blur 20x65535+45 tmp.png
does a 20 pixel asymmetric linear blur of the region around the big star on the hat at a 45 degree angle
convert logo: -region 55x55+430+90 -motion-blur 0x20+45 tmp1.png
does an asymmetric gaussian blur
Note:
1) convert syntax usually needs the input image right after "convert"
2) It also looks like -region needs to be specified right after the input as when I do
convert logo: -motion-blur 10x65535 -region 40x40+120+50 tmp2.png
it blurs the whole image.
Re: Motion Blur
Ah, region needs to be at the start of the command.
By the way can someone please do an example for me?
I've tried -region 101x86+39+47 to select the below box but it didn't really work.
http://img507.imageshack.us/img507/6615/regionuv1.png
By the way can someone please do an example for me?
I've tried -region 101x86+39+47 to select the below box but it didn't really work.
http://img507.imageshack.us/img507/6615/regionuv1.png
Re: Motion Blur
An example as requested
Code: Select all
convert flowers.jpg -region 100x100+90+90 -motion-blur 20x65535+45 tmp.png
Re: Motion Blur
Ah never mind, it was just -region. The PHP script was calculating the width and height wrong.
Thanks for your help
Thanks for your help