How to convert white to background color of an image in flex?

I have an image and I want to remove white from the image.

This color removal is similar to the background color. If anyone knows about this issue, please answer:

And my application is in Flex 3, please send me the action script code of this issue. Thanks.

+1


a source to share


2 answers


Below is a piece of code that gives you the functionality you expect.



var sourceBitmap:BitmapData = new BitmapData(myChart.width, myChart.height,true,0x000000);
sourceBitmap.draw(myChart);  
//prev image is the "Image" variable name
prevImage.source = new Bitmap(sourceBitmap);

      

+2


a source


  • use infranview to change the background of the image from white to transparent (by saving as PNG).
  • use flex as usual
  • profit!


0


a source







All Articles