Buffered Image problem

asukai
asukai used Ask the Experts™
on
When I rotate an image with the following code

AffineTransform transform
        = AffineTransform.getRotateInstance(Math.toRadians(angle),
                                bufferedImg.getWidth() / 2, bufferedImg.getHeight() / 2);
    AffineTransformOp op = new AffineTransformOp(transform,
                               AffineTransformOp.TYPE_BILINEAR);
    filter(op);


It leaves the background of the image to black. (Screen shot of the problem:  http://www.asuka-net.net/images/prob1.gif Is there anyway that I can set it to white?

Cheers,

asukai
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Java Developer
Top Expert 2010
Commented:
paint the background white before you paint the image to be rotated.
Mick BarryJava Developer
Top Expert 2010

Commented:

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial