royale-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <>
Subject [GitHub] [royale-asjs] aharui edited a comment on issue #878: mx:Image uploading is not working
Date Wed, 01 Jul 2020 15:56:44 GMT

aharui edited a comment on issue #878:

   Loading images from loaded data is trickier in Royale because the browser can't handle
image data like Flash does.  Your code will have to detect the file type and encode the data.
   		import mx.utils.ByteArray;
   		import org.apache.royale.utils.Base64;
          COMPILE::JS {
           var encodedData:String = Base64.encode( as ByteArray);
   	profilePic.applyImageData("data:image/png;base64," + encodedData);
   I think you have to swap out `image/png` for `image/jpeg` and other formats depending on
what got loaded.

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:

View raw message