Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 154219
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T09:56:24+00:00 2026-05-11T09:56:24+00:00

I have a graph component in Flex and my end-user wants to be able

  • 0

I have a graph component in Flex and my end-user wants to be able to manipulate this control in Flex, and then export the result into Powerpoint. I don’t have a problem exporting an Image to Powerpoint, but where I am running into a problem is with exporting the Flex component to a .NET web service. Here is the code I have come up with…

The Web Service Declaration:

<mx:WebService id='ws' wsdl='http://localhost:59228/CreateImageService.asmx?wsdl'> <mx:operation name='CreateImage' resultFormat='xml'/> </mx:WebService> 

The Flex code:

    private function btnCreateImage():void {     var imageSnap:ImageSnapshot = ImageSnapshot.captureImage(TeamChart);     var imageByteArray:ByteArray = imageSnap.data as ByteArray;      ws.CreateImage(imageByteArray);      //swfLoader.load(imageByteArray);  } 

And the Web Service code:

    [WebMethod]     public void CreateImage(byte byteArrayin)     {         CreateImage createImage = new CreateImage();         createImage.byteArrayToImage(byteArrayin);     } 

I know the component is being converted successfully to a ByteArray because I can use SWFLoader() to make it reappear within the Flash canvas. If I try to send the bytearray to the .NET web servie, I get a SOAP errr. If I submit a 0 to the web service, this will at least hit the web service.

I’m not quite sure where the problem is, but I fear it’s something simple that I’m overlooking.

Much appreciated,

-Matt

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T09:56:25+00:00Added an answer on May 11, 2026 at 9:56 am

    I figured it out. I had to encode the image as a base64 string and send it to .NET that way. Here is my code:

    Flex:

    private function btnCreateImage():void {     var imageSnap:ImageSnapshot = ImageSnapshot.captureImage(TeamChart);     var image64BitText:String = ImageSnapshot.encodeImageAsBase64(imageSnap);      ws.CreateImage(image64BitText);      //swfLoader.load(imageByteArray);  } 

    .NET Web Service

    public Image byteArrayToImage(string base64ImageString) {     // Convert Base64 String to byte[]     byte[] imageBytes = Convert.FromBase64String(base64ImageString);     MemoryStream ms = new MemoryStream(imageBytes, 0,       imageBytes.Length);      // Convert byte[] to Image     ms.Write(imageBytes, 0, imageBytes.Length);     Image image = Image.FromStream(ms, true);     return image; } 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this object graph, I want to map: abstract Account (username, password, ...)
The situation is this: You have a Hibernate context with an object graph that
I have created a graph component in AS3 which extends UIComponent. I created an
I have a graph of components and relations between them. User start navigation with
I have a Graph being drawn inside a UIScrollView . It's one large UIView
I have a DirectShow graph to render MPEG2/4 movies from a network stream. When
I have an object graph serialized to xaml. A rough sample of what it
So I have an object graph, let's just say it's an order. You have
I have a problem related to graph. I am not a computer science grad
I have a pretty sizeable object graph that I have serialized to a file

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.