views:

22

answers:

3

If i send bitmap data from Flash AS3, to PHP and then PHP turns the bitmap data into a image file and saves on server... Would it take too much resources?

I mean, The Bitmap Data could contain too much pixels etc does that affect the resources? If 10-100 people send data simultaneously is it going to cause problems... What kind of specs are you looking for to do this thing?

+2  A: 

This is impossible to answer without knowing your server specs and the kind of application you're building.

But before it even comes to that - I don't speak AS3, but surely Flash can do the conversion into an image file by itself? That would put the load on the client machine, which can deal with it easily. Sending the finished file to a PHP process is a much less resource-consuming task.

Pekka
I havent found a way in which Flash Can do this, I tried searching and it looks like it is not possible to do this... So i will have to send it to PHP and then build the image there
Melina
A: 

It's 100kb in compressed as jpg but when it comes to bmp it could make for a 1024x768 image, 2MB . That is the default download limit for generic php installation. To process on the image it takes nearly same amount of memory.

In conclusion, It wont be a problem

nerkn
The max resolution will be 800x600 but an average resolution of the bitmap would be about 600x400
Melina
600x400= 480.000 there are 1 byte for each color 1.2MB. In my hosting Ican gather upto 90Mb.
nerkn
Thank you, some valuable information. I think we will be using 4-8GB of ram for our Server Specs.
Melina
A: 

You can do the encoding in Flash. This article should show you how to do it
http://henryjones.us/articles/using-the-as3-jpeg-encoder

PatrickS
Yes i just figured this out a few minutes ago, thanks for the heads up though!
Melina
you're welcome ;)!
PatrickS