Skip to main content
Participant
June 23, 2010
Answered

Is it possible to send a image using NetStream or NetConnection?

  • June 23, 2010
  • 1 reply
  • 581 views

Would I be able to send a image using NetStream or NetConnection?

    This topic has been closed for replies.
    Correct answer

    Hi mattbanks82 ,

    I haven't actually tried this before, but I think this can work if you can somehow encode the image as a byte array and send it, and then on recieving it you can decode the byte array. There is a JPEGEncoder class impemented as a part of AS3 core lib project http://code.google.com/p/as3corelib/ that can encode a JPEG image as byte array but I am not really sure whether it will serve your purpose. May be you can check the documentation of the class to see if it suits your purpose. Otherwise you can consider implementing your own encoder.

    Thanks,

    Abhishek

    1 reply

    Correct answer
    June 24, 2010

    Hi mattbanks82 ,

    I haven't actually tried this before, but I think this can work if you can somehow encode the image as a byte array and send it, and then on recieving it you can decode the byte array. There is a JPEGEncoder class impemented as a part of AS3 core lib project http://code.google.com/p/as3corelib/ that can encode a JPEG image as byte array but I am not really sure whether it will serve your purpose. May be you can check the documentation of the class to see if it suits your purpose. Otherwise you can consider implementing your own encoder.

    Thanks,

    Abhishek