PDA

View Full Version : flash loading and saving image from php id


anurag
07-16-2007, 05:48 AM
Hello everyone i am working on a project where we have to create a paint like software .In it the images are to be loaded using the url that contains id passed from php .The user will draw its own shape over those image and then save it .he will get the copy of that image on his pc
But the original image will not be affected.
I am ready with the paint stuff,but dont know how to load it fro php id and than how to save it .I know it first needed
to be saved on server than to users pc
Pleez help
Thanks in advance:confused:

spriggan
07-19-2007, 06:39 AM
first off you wouldn't need to save it on the server, unless you wanted to, you'd just need to display it in a browser window so the user could save the image (PHP cannot save to a user's pc directly).

Second you should check to make sure you PHP install has the GD library active (do a phpinfo(); ) that's the image library for PHP and you can't do anything without it.

next your best bet would be to assign the background image an id that gets passed (you'll use Post for both of these so nothing shows up in the URL) and then an array of all the line x,y coordinates, thickness and color. You're basically going to have to redraw all the lines that were created in flash in PHP via the array.

If there's a better way to do this I'm not aware of it.

Here's the manual on PHP image functions: http://www.php.net/manual/en/ref.image.php

and an intro to using said functions: http://phpbuilder.com/columns/rasmus19990124.php3