image to be displayed in an <mx:Image> tag? You could write your
own code that decodes base64 encoded data, but what you would end up
with couldn't be used as the source property for an Image tag; the
source property wants a relative of absolute URL of the image.
Also, in Flex 1.5, only JPEG and SWF formats can be dynamically
loaded at runtime, so you need to use @Embed for other formats.
What I typically do in a situation like this is create a separate
page on the Flex server (JSP, CFM, PHP, or the technology of your
choice) that does whatever it needs to (in this csae, access the
webservice to retrieve the base64-encoded image and decode it) and
then writes the results to the output stream. In your flex app, you
could then access the image by using the url to that new page on
your Flex server.
<mx:Image source="@Embed('path/to/decoder/page/?optionalParams')"/>
Easy to test, too: just type the URL of the new page in your browser
and verify that you see the correct PNG or GIF image.
Hope that helps.
Doug
--- In [email protected], "digital_eyezed"
<[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I am accessing a web service which returns a base64Binary image.
>
> Can I convert this to a PNG or GIF in flex?
>
> This is the part of the return which includes the image:
>
> <Map>
> <bits>base64Binary</bits>
> <type>string</type>
> </Map>
>
> Cheers,
>
> Iain
>
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

