Skip to main content
Inspiring
February 20, 2008
Answered

best way tosave, store, retrieve bitmap or jpg image flash 8 and lamp

  • February 20, 2008
  • 3 replies
  • 314 views
I'm working on a social networking site where I need the user to be able to save an image. Other users will be able to view this users profile seeing this image that was saved to a mysql database.

Any ideas where to start?

Thanks
This topic has been closed for replies.
Correct answer Newsgroup_User
In addition to what kglad said (thanks for the plug, BTW), it more sounded
to me like you want users to be able to upload images to the server, instead
of letting people save jpeg's to their local machine. In that case, just use
the FileReference class' upload method. You'll also need a server-side
script to save the file on the server, and store the image name in your
database.

So, I'd suggest you start by looking in the Help at the
FileReference.upload() method.


--
Dave -
Head Developer
http://www.blurredistinction.com
Adobe Community Expert
http://www.adobe.com/communities/experts/


3 replies

kglad
Community Expert
Community Expert
February 22, 2008
oops, i think you may be correct dave.

i streamlined (slightly) and used your array compression method to email graphics created in flash and thought the time required for processing was comparable to mario klingemann's class. but your method is much easier to use (and understand).

the main time consumer is the getPixel() loop. it would be nice if as2 had a more efficient way to assemble the data in an image.
Newsgroup_UserCorrect answer
Inspiring
February 20, 2008
In addition to what kglad said (thanks for the plug, BTW), it more sounded
to me like you want users to be able to upload images to the server, instead
of letting people save jpeg's to their local machine. In that case, just use
the FileReference class' upload method. You'll also need a server-side
script to save the file on the server, and store the image name in your
database.

So, I'd suggest you start by looking in the Help at the
FileReference.upload() method.


--
Dave -
Head Developer
http://www.blurredistinction.com
Adobe Community Expert
http://www.adobe.com/communities/experts/


kglad
Community Expert
Community Expert
February 20, 2008
you can use the bitmapdata class and some server-side scripting to save images using as2. the main problem is data compression to speed processing of the image.

mario klingemann's bitmapexporter class (www.quasimondo.com) offers some image compression methods or check dave mennenoh's (www.dmennenoh.blogspot.com) simple but surprisingly effective array compression method: