views:

64

answers:

1

I was wondering if it would be possible to recognize that a BufferedImage in java is a blank (invisible for a user in a browser) image.

+1  A: 

You mean entirely transparent?

You could use the BufferedImage.getAlphaRaster() and traverse the pixels to check that they are all completely transparent.

aioobe
ok, i am trying the traversing... but what does it mean if an image has no alpharaster? getAlphaRaster() for some images it returns null?
edwin eversdijk
@edwin - then the image has no alpha channel and therefore cannot be transparent
a_m0d