Distorting Text
-
Hi... im trying to emulate a simple captcha control. I wanted to distort a text generated by Graphics.DrawText() method. Or is there a better way to make this? Thanks a lot.
-
Hi... im trying to emulate a simple captcha control. I wanted to distort a text generated by Graphics.DrawText() method. Or is there a better way to make this? Thanks a lot.
Rue Leonheart wrote:
is there a better way to make this?
Without using GDI+? I don't think so.
Best wishes, Navaneeth
-
Hi... im trying to emulate a simple captcha control. I wanted to distort a text generated by Graphics.DrawText() method. Or is there a better way to make this? Thanks a lot.
Have you considered using ImageMagick? We use it for a number of similar processes. Fred's ImageMagick Scripts contains a captcha sample script: http://www.fmwconcepts.com/imagemagick/captcha/index.php[^]
Regards, Gary
-
Have you considered using ImageMagick? We use it for a number of similar processes. Fred's ImageMagick Scripts contains a captcha sample script: http://www.fmwconcepts.com/imagemagick/captcha/index.php[^]
Regards, Gary
Can you post me a link for a tutorial on how to use scripts in an ASP.NET page? Thanks for the help.
-
Can you post me a link for a tutorial on how to use scripts in an ASP.NET page? Thanks for the help.
I have not used that specific captcha technique I mentioned, but I do use ImageMagick (IM) with ASP.NET. I have a pretty basic article on COde Project about generating previews from uploaded images with IM, Using ImageMagick to Create Previews and Thumbnails from Uploaded Images[^]. This is similar to what you are trying to do by creating a dynamic image and return it to the browser. The key method is
CallImageMagick(string fileArgs)
. You pass your argument, such as the captcha command, which defines the distortions and the output path of the file. The random string used to create the captcha using IM would be stored and used to verify the user response to the captcha challenge. IM is easy to download and install. The latest update which I just installed on our server was "ImageMagick-6.6.0-7-Q16-windows-dll.exe". Make sure to check the last install option - "Install ImageMagickObject OLE Control...", so that MagickCMD.exe will be installed. You will need to provide the path to this file in your code; see my article. There are several other good articles on CodeProject about using IM with ASP.NET. That is where I learned about it.Regards, Gary