Jump to content

Imagemagick Blur


The Little Guy

Recommended Posts

I am making an image CAPTCHA, and I want to blur some letters but not others.

 

I have this:

shell_exec($opt = "mogrify -blur $blur -font $font -fill '$color' -pointsize $size -draw \"text $txS,$tyP '".$text{$i}."'\" $file");

 

It is in a loop, and it runs for every letter, setting all the properties, but the first letter is blurred the most and the last letter is blurred the least or not at all. Is there any way I can set a blur for each letter instead of blurring whole image?

Link to comment
https://forums.phpfreaks.com/topic/231062-imagemagick-blur/
Share on other sites

Probably is but without scouring the manual the method I suggest would be to create x number of images & layer them into 1. Lets say your captcha contains 5 characters. I would create 5 images of lets say 20 x 20 using a different blur level for each. Take the 5 images and layer them onto a new canvas of 100 x 20.

Link to comment
https://forums.phpfreaks.com/topic/231062-imagemagick-blur/#findComment-1190216
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.