Question: Need some help on the following JAVA problem: The Transparency interface has 3 constants(OPAQUE, BITMASK, and TRANSLUCENT) and the following method declaration: int getTransparency() returns

Need some help on the following JAVA problem:

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

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

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

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

The BufferedImage class implements this interface. Write a program to load images from files of different types(JPEG,PNG,GIF) into the computer's memory and determine their transparency. For example JPEG images are fully opaque and cannot be made transparent, so these are of type OPAQUE. Check whether it is possible to modify the transparency of an image for which the getTransparency() method returns value 1/OPAQUE.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!