distort text for captcha code
Hi to all!
I'm searching on the net but 'till now i have no found a solution.
At the moment i can create a captcha code like this but i don't know how to distort the text, can you help me?
I thought that i could distort the text after that it becomes an image.
I have found this:
it is a class isn't it?
Some body can help me to use it?
I just made some captcha code a few weeks ago. Basically I made a white rectangle background and then on top of it I randomly placed about 50 black rectangles 2 pixels by 20 pixels, for distortion. To add a bit more distortion I randomly picked from about 10 fonts for the letters, and then randomly rotate them between +20 and -20 degrees.
It took a fair amount of experimentation to figure out each piece of the code but over all not to difficult once you're familiar with rendering images in PHP.
I can see some uses for distortImage in a captcha but I doubt one needs to go that far to make a good captcha image.
No, distortImage is a method for the Imagick class. You create an image object with Imagick and apply the distortImage method to that image object. If you're not familiar with OOP (Object Oriented Programming) it may be difficult to figure out.
Like did you do it?
Originally Posted by _Krik_:
Can you post me an example?
An example should be great!
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)