So what you're saying is I can use the bitmap class to create a sort-of compressed version of the photo and then recreate the full-sized photo on the server with the GD library? If possible, can I keep the scaled-down version? (I'm also thinking about server storage space... 1000 photos @ 7MB each = 7GB for each shoot).
Can you expand a little on your idea? Also, what do you consider a "very fast connection"?
Main Topics
Browse All Topics





by: vickerleungPosted on 2007-02-18 at 07:22:55ID: 18558645
victornegri,
I have the following idea that you may try.
(I can give you further detail if you think it works)
Flash 9~ actually 8 already have a great Bitmap class.
Make use of the Bitmap class, you are possible to retrieve every single pixel of the photos.
Of course you will not get all the pixels~ You will scale down the image inside Flash first.
This is rather simple by something like _image_loader.scaleX = 0.25;
After you scale it down, get the pixels using Bitmap class~
and at last passing the bitmap data to PHP~ using GD library to rebuild the image file.
So~ the only advantage here is that you minimize the bandwidth used to upload the large image to the server.
But the disadvantage is that the process is more complicated~
The performance might not be better if~ let's say your user actually have very fast connection~
Just some idea for you to think of~
Cheers
Vicker