Mitesh panchal
Mitesh panchal

Reputation:

How to transpernt white color to background color of image in flex?

I have an image and i want to remove white color from image.

That removing color is same like its background color. If anybody have any idea of this problem please answer?

And my application in Flex 3 so please send me action script code of this problem.Thank you

Upvotes: 1

Views: 1761

Answers (2)

Bhaskar
Bhaskar

Reputation: 21

Below is the code snippet that give you the expected functionality.

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);

Upvotes: 2

Dan
Dan

Reputation: 1161

  1. use infranview to change the image's background from white to transparent (by saving as PNG).
  2. use flex as usual
  3. profit!

Upvotes: 0

Related Questions