Menu

Need Help Following Java Problem Transparency Interface 3 Constants Opaque Bitmask Translu Q43832921

Need some help on the following JAVA problem:

The Transparency interface has 3 constants(OPAQUE, BITMASK, andTRANSLUCENT) and the following method declaration:

int getTransparency() returns value 1 (OPAQUE) is the image isfully opaque and cannot be made transparent.

int getTransparency() returns value 2 (BITMASK) if the image canonly be either fully opaque or fully transparent.

int getTransparency() returns value 3 (TRANSLUCENT) if the imagecan be partially transparent.

The BufferedImage class implements this interface. Write aprogram to load images from files of different types(JPEG,PNG,GIF)into the computer’s memory and determine their transparency. Forexample JPEG images are fully opaque and cannot be madetransparent, so these are of type OPAQUE. Check whether it ispossible to modify the transparency of an image for which thegetTransparency() method returns value 1/OPAQUE.

Expert Answer


Answer to Need some help on the following JAVA problem: The Transparency interface has 3 constants(OPAQUE, BITMASK, and TRANSLUCEN…

OR