Hello,
Is is possible to read the text from a png file in php? The length of the text would always be 32 characters, with never any spaces. The string starts after a * and ends at the next *
eg: *ddb95d7abcdfb7f79f96ba59aa89waa6*
Now, each image would have a different set of characters, but they would all be in the same spot on the image.
I know it is possible to do this in Windows programming languages such as c++ and delphi, but I do not have much experience with php. I did search google briefly, and found nothing.
So...it is possible? And if so, how would I go about doing it?
Thanks.
Read text from image
Moderator: General Moderators
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Short of some sort of character recognition software (which you would probably exec()), if you wanted to do it in PHP then maybe you could cut each character out of the image (GD/Imagemagik) and do a binary comparison with a set of reference images. You could probably simplify it a little by just comparing MD5s of the two. But all that assumes that the characters in the image are always identical when cut-out. If there is anti-aliasing or different compression, then they would be different and comparing them would not work.
(#10850)