GDI+ PHP with existing image
Moderator: General Moderators
-
Mmondragon
- Forum Newbie
- Posts: 9
- Joined: Fri Mar 17, 2006 12:37 am
GDI+ PHP with existing image
hi everyone, i have a project right now, it's some kind of approval system. i have scanned signatures already of our directors/ officers. my question is that i want to make it secure that it can't be download by others and also to have some kind of embedded randomly-generated alphanumeric strings on that image. meaning if someone copies the image for his own purpose i can verify that it is not system generated because it does not contain any randomly-generated alphanumeric strings. is this possible with GDI+ or any php function? i am thinking like CAPTCHA it has some kind of distorted images, right? but somehow it does have the same concept, the only diff. is i do have an existing image, what i want is to embed the randomly-generated alphanumeric strings into it...
thanks in advance!
thanks in advance!
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
I'll have to re-read your message tomorrow as I'm dead tired and just finished writing my life story 
But...
GDI+ is a Windows only library (that I know of) and would require dealing with the Windows API more specifically .NET
Not exactly what PHP was made for...but I'll read this again tomorrow and see if I can offer a better solution...
Cheers
But...
GDI+ is a Windows only library (that I know of) and would require dealing with the Windows API more specifically .NET
Not exactly what PHP was made for...but I'll read this again tomorrow and see if I can offer a better solution...
Cheers
-
Mmondragon
- Forum Newbie
- Posts: 9
- Joined: Fri Mar 17, 2006 12:37 am
i'm sorry, i think i have mistaken the term GDI+ and the GD library. it's GD library or what we called image function in php to manipulate images. thanks!Hockey wrote:I'll have to re-read your message tomorrow as I'm dead tired and just finished writing my life story
But...
GDI+ is a Windows only library (that I know of) and would require dealing with the Windows API more specifically .NET
Not exactly what PHP was made for...but I'll read this again tomorrow and see if I can offer a better solution...
Cheers
-
Mmondragon
- Forum Newbie
- Posts: 9
- Joined: Fri Mar 17, 2006 12:37 am
-
Mmondragon
- Forum Newbie
- Posts: 9
- Joined: Fri Mar 17, 2006 12:37 am
ok, here it is, what i want is to "probably modify the image" to populate my random-generated strings into it. like in CAPTCHA? somehow there's an image, but at the background there is some kind of pseudo-string, sort of....onion2k wrote:Umm.. that was an either or question. "Yes" isn't a valid answer. Do you want to:
1. Modify the image to add a string so that it can been seen when you view the image.
OR
2. Modify the file to add a string so you can check for the string by opening the file in a text editor.
-
Mmondragon
- Forum Newbie
- Posts: 9
- Joined: Fri Mar 17, 2006 12:37 am
Pretty easy then. Just create an image using imagecreate() or imagecreatetruecolor(), draw the text on using imagestring(), and then use imagecopy() or imagecopymerge() to copy the signature image. You'll need to be make sure your signature image is good quality, and preferably a 32bit PNG file so you can have transparency, but it's a very straight forward thing to do.
I wrote an article for phpgd.com that details the major steps: http://www.phpgd.com/articles.php?article=5
I wrote an article for phpgd.com that details the major steps: http://www.phpgd.com/articles.php?article=5