|
Quick Lists
|
|
Bug ID:
|
4138167
|
|
Votes
|
0
|
|
Synopsis
|
transparency on gifs on a JButton
|
|
Category
|
java:classes_2d
|
|
Reported Against
|
swing1.0.2
|
|
Release Fixed
|
|
|
State
|
11-Closed,
Not Reproducible,
bug
|
|
Priority:
|
4-Low
|
|
Related Bugs
|
|
|
Submit Date
|
13-MAY-1998
|
|
Description
|
I am writing a tictactoe program for school, I used gifs for the X's and O's, and a transparent
gif for an empty spot. Using JDK 1.1.6, and Swing 1.01, all was well. I "upgraded" to JDK1.2Beta3
the other day, and went to work on fininshing the project. Now, under 1.2, the transparent gif,
instead of being "invisible" as in the 1.1.6, is now a black square.
(Review ID: 30319)
======================================================================
Posted Date : 2006-03-03 05:53:31.0
|
|
Work Around
|
N/A
|
|
Evaluation
|
Where's the test case or GIF?
xxxxx@xxxxx 1998-06-01
The gif file, null.gif, has a transparent pixel (31) that is out of range. There are only 2 opaque entries in the color map so this image is considered opaque. JDK1.2 initializes an image buffer to 0's (or the background color, if it was created from a Component) so an opaque image starts off as all black.
No pixels are being set for this GIF so the image is being drawn black.
In JDK1.1.x, if pixels are not set by the decoder, nothing is drawn so the
image looks transparent. We need to create regioning
code for JDK1.2 to match 1.1 behavior.
xxxxx@xxxxx 1998-06-29
The bug is not reproducible since 5.0 (thanks to leouser for bringing this to our attention =).
Posted Date : 2006-03-03 17:54:56.0
|
|
Comments
|
Submitted On 16-DEC-1998
kurti
I had the same problem; the gifs are at
http://www.huwig.de/exit.gif
http://www.huwig.de/rechnen.gif
Kurt
import javax.swing.*;
public class GifBug extends JFrame {
public static void main (String args[]) {
new GifBug();
}
public GifBug() {
JButton jb =
new JButton( new ImageIcon( getClass().getResource( "exit.gif"
) ) );
getContentPane().add( jb );
pack();
show();
}
}
Submitted On 26-JUN-2000
kurti
When displayed with GIMP, the GIFs had a smaller layer,
bounding all coloured pixels. I extended this layer to cover
the whole image and it's fine now.
PLEASE NOTE: JDK6 is formerly known as Project Mustang
|
|
|
 |