Alpha « Icon Image « Java Swing Q&A





1. java.lang.IllegalArgumentException: Number of scaling constants does not equal the number of of color or color/alpha components    stackoverflow.com

I am writing aplha composite test app based on this example

/* Create an ARGB BufferedImage */
   BufferedImage img = (BufferedImage)image;//ImageIO.read(imageSrc);
   int w = img.getWidth(null);
   ...

2. Java - change transparency of image over time    stackoverflow.com

I am trying to make a game object that can be made semitransparent during the game's runtime. My semitransparency filter works fine when I apply it to my object's image before ...

3. how to detect the alpha channel in an image ?    coderanch.com

hi all, I'm having a problem to find whether the png image is supporting alpha channel. Though, alpha channel is supported by all png files, there may be a chance to create a png image without having Alpha channels thro' photoshop, by saving as - > and selecting exclude alphachannels option. In this scenario, I've to find whether the png is ...

4. Is this even possible in Java? Overlaying multiple images with alpha channels    coderanch.com

I've got a homework assignment due soon, but the requirements are pretty broad. One of my ideas for meeting all the requirements involves overlaying multiple images with alpha channels (transparency). To be more specific, I am thinking about making an application to choose the color and pattern of a skydiving jumpsuit. The colors will be chosen by three slider bars for ...

5. how do I set the alpha value on Images?    java-forums.org

I'm looking at the Graphics.drawImage() methods and I don't see anything for setting the alpha value of the image. What I mean is, I want to draw an image that is half transparent, but I don't see a way to do that. I've also looked into the Image, ImageObserver, and Graphics2D classes to no avail. Does anyone have any suggestions?