Hello, I am very new to php and I followed this tutorial for Flash to generate an image using a swf that is on my server.
http://www.sephiroth.it/tutorials/flash ... nt_screen/
The problem is, the pixels do not save to a .jpg or .png, they are simply posted inside of a 'pixels.php' file and cannot be downloaded as an image file by the users.
What I am hoping is that the pixels.php could generate an image file instead of posting the pixels, and showing the image to the user that created it, while it is stored on my server.
Any help would be greatly appreciated,
Duder
Swf generated pixel data in php.. To jpg?
Moderator: General Moderators
Re: Swf generated pixel data in php.. To jpg?
If you can see the image then you can save it. For Firefox you can right-click an image and hit Save Image As.
The only thing you mentioned that's not present in the script is how to save the image to your server.
That "" can be a filename, like "image.jpg". If you give a filename then the image will not be displayed and instead be saved on the machine.
Are you talking about giving the user an open/save dialog?
The only thing you mentioned that's not present in the script is how to save the image to your server.
Code: Select all
imagejpeg($img, "", 90);Are you talking about giving the user an open/save dialog?
Re: Swf generated pixel data in php.. To jpg?
When I right-click/save as, it asks if I want to save a php file.tasairis wrote:If you can see the image then you can save it. For Firefox you can right-click an image and hit Save Image As.
The only thing you mentioned that's not present in the script is how to save the image to your server.That "" can be a filename, like "image.jpg". If you give a filename then the image will not be displayed and instead be saved on the machine.Code: Select all
imagejpeg($img, "", 90);
Are you talking about giving the user an open/save dialog?
The idea is to make it easy on the users, not me for a quick fix to a permanent problem.
I would like them to have the option of saving it where they want.
If not that, then displaying the URL to the image that they have just created .
The idea is to use data that they inputted(text), then take a snap from the processed data(similar to a "scores page of a game), and host it on my server. The data will be updated several times, and the .jpg recreated on command and the old image is to be overwritten (the new image should use the same filename) so that they can link to that image and it will seemingly auto-update where ever they post it on the Internet because it will have the same URL
Also, would there be a way to name the file after some of the data in the Flash file?