Pravinc wrote:
Hey all,

I have one flex+PHP application.

Main purpose of the site is to sell T-shirts online.

Flex is used for generating different designs on available tshirt.

Something similar to Cafepress dot com.

I want to generate 300 DPI tshirt image from flex and send it to PHP side
for processing.

Now the question is Flex doen't support direct image generation.

So flex send's a Bytearray for 300 dpi image which is quite Bigger.some time
it crashes the browser while processing..because of heavy data..

And can not store in any of MySQL datatype.

Also storing in a txt file is too much time taking process..

Any Suggestion or help to come out fron this issue..


ByteArray should be fine, simply ensure you pack it before sending, then unpack it and read the floats back out with php to get the pixel values, you can then recompile with gd or suchlike (set pixel methods) and save as an image.

Your alternative is to go with flash player 10 specific action script 3 and use vectors or fxg (on this note there are also some svg parsers for action script, 3rd party for fp9) - this approach will give you the same results but substantially less bytesize - whilst giving you no loss in quality seeing as they are vectors)

one recommendation I would make is to use display objects throughout the process clientside, then BitmapData.draw( DisplayObject ) to a BitmapData, then getPixels on that to get your bytearray at the last minute.

If you really come up short you can look at using alchemy to embed some C processing code in there, it really speeds up the process of working with huge ByteArrays as the c code is preoptimised and runs much faster.

Many Regards,


PHP General Mailing List (
To unsubscribe, visit:

Reply via email to