1 Reply Latest reply on Nov 2, 2011 10:07 PM by alinator11

    Default image format as bytearray

    alinator11 Level 2

      I am seeing my mobile app be very slow whenever I need to process images. In particular, I need to caputre images with the camera, turn them to ByteArray's and send to Java via Blaze. All of this works but it's SLOOOOOOOOWWWWWW. After much testing, I've discovered that it's the Flex JPGEncoder that is taking forever and a day - seriously, I thought the app was hung until I suddenly saw the server start processing out of the corner of my eye. So... instead of doing this encoding on the device and sending up to the server, can I just send a ByteArray of the BitmapData I get by drawing the video component from the screen and then encode to JPG via Java?


      The only method I see for turning an image to a bytearray is the JPEGEncoder.encode(bitmapData) function. Can I turn the image to a ByteArray and just send a bitmap up to Java without encoding on the device?