Page 1 of 1

blur effect - how to transform

Posted: 2010-09-20T01:16:57-07:00
by Im Jinho
OS : linux
imageMagick : MagickCore

Hi, everyone.
I tried to transform a image with blur effect that remove block status of output image.

When I test convert Shell command like folling:
convert -blur 1x1 -resize 320x240 test.jpg result_test_blur_1x1_resize_320x240.jpg
convert -blur 3x3 -resize 320x240 test.jpg result_test_blur_3x3_resize_320x240.jpg

It was success.

But, when I test using source MagickCore like folling source:

Code: Select all

image->blur = 3.0;
It wasn't success.
I can't get any blur effect that I want.

How to get blur effect using MagickCore Library?

thanks.

Re: blur effect - how to transform

Posted: 2010-09-20T06:40:20-07:00
by anthony
On the Command Line API, try reading the image FIRST before applying the operations on it. That is do the arguments (as you would do them in a program. Otherwise IM has to sort or 'guess' what order of operations you meant.

See IM Examples, Basics
http://www.imagemagick.org/Usage/basics/

image->blur is NOT a blur operation but a attribute (an old one) that used to be involved with resize filter blurring.
That attribute is not even used any more, having bee replaced by a 'expert' option, and probably should be removed.

You need to look for a BlurImage() type function call, OR better still the newer MorphologyImage Method
that will give you more control. Eventually BlurImage() function will become a wrapper around the appropriate Morphology() function calls.