-
Bug
-
Resolution: Not an Issue
-
P4
-
None
-
9
-
x86_64
-
windows_7
FULL PRODUCT VERSION :
java version "9-ea"
Java(TM) SE Runtime Environment (build 9-ea+170)
Java HotSpot(TM) 64-Bit Server VM (build 9-ea+170, mixed mode)
jdk 8 also has the same problem
java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b18)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b18, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.1.7601]
win7 x64
A DESCRIPTION OF THE PROBLEM :
some image turns red after ImageIO.write(buf, "jpg", file)
the java code is simple
BufferedImage buf = ImageIO.read(new File("l:/before.png"));
ImageIO.write(buf, "jpg", new File("l:/after.jpg"));
see the image files in attachements
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
run the code
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
the new image should not looks red.
ACTUAL -
the new image looks red.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
public class T{
public static void main(String[] args) throws IOException {
BufferedImage buf = ImageIO.read(new File("l:/before.png"));
ImageIO.write(buf, "jpg", new File("l:/after.jpg"));
}
}
---------- END SOURCE ----------
java version "9-ea"
Java(TM) SE Runtime Environment (build 9-ea+170)
Java HotSpot(TM) 64-Bit Server VM (build 9-ea+170, mixed mode)
jdk 8 also has the same problem
java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b18)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b18, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.1.7601]
win7 x64
A DESCRIPTION OF THE PROBLEM :
some image turns red after ImageIO.write(buf, "jpg", file)
the java code is simple
BufferedImage buf = ImageIO.read(new File("l:/before.png"));
ImageIO.write(buf, "jpg", new File("l:/after.jpg"));
see the image files in attachements
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
run the code
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
the new image should not looks red.
ACTUAL -
the new image looks red.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
public class T{
public static void main(String[] args) throws IOException {
BufferedImage buf = ImageIO.read(new File("l:/before.png"));
ImageIO.write(buf, "jpg", new File("l:/after.jpg"));
}
}
---------- END SOURCE ----------