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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.