Welcome, Guest
  • Author Topic: Decode base64 picture from an XML-file  (Read 3207 times)

    antonto

    • Server what's that
    • *
    • Posts: 2
      • View Profile
      • Email
    Decode base64 picture from an XML-file
    « on: 09/19/06, 13:57 »
    Hi flash-lovers,

    I wrote a webservice returning an XML-file containing a picture in base64-encoding (byte[] ). The service works just fine, it's the decoding part in Flash MX 2004 I'm having troubles with...

    I'm able to capture the XML-file and read out the tag containing the picture.

    Here's the tricky part: How do I get the binairy code into an MC or other object showing the picture?

    Every tip, trick or link is very much appreciated...



    Jorge Solis

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 14616
      • View Profile

    antonto

    • Server what's that
    • *
    • Posts: 2
      • View Profile
      • Email
    Re: Decode base64 picture from an XML-file
    « Reply #2 on: 09/21/06, 14:17 »
    Hi !
    Thank you Jorge for your quick reply.

    Meanwhile  I succeeded in decoding the byte[] inside Flash8 but I still can't (don't know how to) get that ByteArray inside a movieclip.

    Again, every tip, trick or link is very much appreciated...

    Jorge Solis

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 14616
      • View Profile
    Re: Decode base64 picture from an XML-file
    « Reply #3 on: 09/22/06, 02:33 »
    The only way to recreate an image is to use RGB pixel info color inside a BitmapData. So next step is to pass binary data to HEX colors, probably using some back-end script or using posted library.

    Jorge