Page 1 of 1

Blur

Posted: 2011-11-17T07:51:21-07:00
by jupiter
I've tried several different methods and parameters now.

but the code:

Image image( "100x100", "white" );
image.read("test.jpg");
image.blur(6.0, 1.5);
image.write( "test123.jpg" );

doesn't change the image at all.

what am i doing wrong?

thanks in advance

Re: Blur

Posted: 2011-11-17T10:24:20-07:00
by fmw42
I don't know much about the Magick++ API, so your problem may be with how you are coding it.

However, try leaving the radius=0 and just change the sigma. IM will compute the appropriate radius. note the radius that it computes will be about 3x sigma

Re: Blur

Posted: 2011-11-17T10:29:21-07:00
by magick
Works for us. We're using ImageMagick 6.7.3-6 and this code:

Code: Select all

// g++ `Magick++-config --cxxflags --cppflags` -O2 -Wall -o magick magick.cpp `Magick++-config --ldflags --libs`
#include <Magick++.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
using namespace std;
using namespace Magick;

int main(int argc, char **argv)
{
  Image image( "100x100", "white" );
  image.read("test.jpg");
  image.blur(6.0, 1.5);
  image.write( "test123.jpg" );
}

Re: Blur

Posted: 2011-11-18T03:05:43-07:00
by jupiter
well i don't get it to work.

is the blur effect then directly written into the image? so writing the image should write the blurred image to disc right?

Re: Blur

Posted: 2011-11-18T05:37:08-07:00
by magick
Correct. We get a blurred image.

Re: Blur

Posted: 2011-11-18T06:15:39-07:00
by jupiter
actually i don't. it looks the same as the original image. but binary data is different

Re: Blur

Posted: 2011-11-19T23:38:09-07:00
by jupiter
could you provide me you prebuilt lib? just in case i did something wrong with compiling it myself. i still don't get a blurred image, and shadow doesn't work neither.