blur effect - how to transform

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
Im Jinho

blur effect - how to transform

Post 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.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: blur effect - how to transform

Post 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.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply