Details
-
Type:
Bug
-
Status: In Progress
-
Priority:
P3
-
Resolution: Unresolved
-
Affects Version/s: 9, 10
-
Fix Version/s: 11
-
Component/s: client-libs
-
Labels:
Description
FULL PRODUCT VERSION :
java version "9"
Java(TM) SE Runtime Environment (build 9+181)
Java HotSpot(TM) 64-Bit Server VM (build 9+181, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Windows 10
EXTRA RELEVANT SYSTEM CONFIGURATION :
4K monitor
A DESCRIPTION OF THE PROBLEM :
Java 9 distorts BufferedImages when it automatically resizes screens. I'm suspecting it has something to do with this ==> http://openjdk.java.net/jeps/263 being delivered in Java 9.
Related question asked on Stack Overflow with example output==>https://stackoverflow.com/questions/46736757/disable-automatic-rescaling-of-bufferedimage-in-jdk9
REGRESSION. Last worked in version 8u144
ADDITIONAL REGRESSION INFORMATION:
java version "1.8.0_144"
Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Execute attached source code on Windows 10 using Java 9.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Lines in buffered image should alternate between back and white (using attached source code)
ACTUAL -
Distortion of lines occur in a triangular pattern
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
public static void main(String[] args){
JFrame frame=new JFrame("Java version 9");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
BufferedImage image =new BufferedImage(800,600,BufferedImage.TYPE_INT_RGB);
Graphics2D g=image.createGraphics();
g.setColor(Color.WHITE);
for(int y=0;y<image.getHeight();y+=2){
g.drawLine(0,y,image.getWidth(),y);
}
g.dispose();
ImageIcon imageIcon=new ImageIcon(image);
JLabel label=new JLabel(imageIcon);
frame.add(label);
frame.pack();
frame.setVisible(true);
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Don't upgrade to Java 9
java version "9"
Java(TM) SE Runtime Environment (build 9+181)
Java HotSpot(TM) 64-Bit Server VM (build 9+181, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Windows 10
EXTRA RELEVANT SYSTEM CONFIGURATION :
4K monitor
A DESCRIPTION OF THE PROBLEM :
Java 9 distorts BufferedImages when it automatically resizes screens. I'm suspecting it has something to do with this ==> http://openjdk.java.net/jeps/263 being delivered in Java 9.
Related question asked on Stack Overflow with example output==>https://stackoverflow.com/questions/46736757/disable-automatic-rescaling-of-bufferedimage-in-jdk9
REGRESSION. Last worked in version 8u144
ADDITIONAL REGRESSION INFORMATION:
java version "1.8.0_144"
Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Execute attached source code on Windows 10 using Java 9.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Lines in buffered image should alternate between back and white (using attached source code)
ACTUAL -
Distortion of lines occur in a triangular pattern
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
public static void main(String[] args){
JFrame frame=new JFrame("Java version 9");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
BufferedImage image =new BufferedImage(800,600,BufferedImage.TYPE_INT_RGB);
Graphics2D g=image.createGraphics();
g.setColor(Color.WHITE);
for(int y=0;y<image.getHeight();y+=2){
g.drawLine(0,y,image.getWidth(),y);
}
g.dispose();
ImageIcon imageIcon=new ImageIcon(image);
JLabel label=new JLabel(imageIcon);
frame.add(label);
frame.pack();
frame.setVisible(true);
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Don't upgrade to Java 9
Activity
Field | Original Value | New Value |
---|---|---|
Assignee | Pardeep Sharma [ pardesha ] |
Status | New [ 10000 ] | Open [ 1 ] |
Labels | regression webbug | dcspks regression reproducer-yes webbug |
Attachment | JavaHiDPI.java [ 73055 ] | |
Attachment | 9vs8u144.png [ 73056 ] |
Labels | dcspks regression reproducer-yes webbug | dcspks hidpi regression reproducer-yes webbug |
Project | Java Incidents [ 10301 ] | JDK [ 10100 ] |
Key | JI-9051185 | JDK-8189416 |
Workflow | JBS Incident Workflow [ 4961038 ] | JBS Workflow [ 4961038 ] |
Component/s | client-libs [ 10307 ] | |
Component/s | client-libs [ 10700 ] | |
Affects Version/s | 9 [ 14949 ] | |
Affects Version/s | 9 [ 16400 ] |
Subcomponent | 2d [ 482 ] | 2d [ 197 ] |
Assignee | Pardeep Sharma [ pardesha ] |
Status | Open [ 1 ] | New [ 10000 ] |
Fix Version/s | 10 [ 16302 ] |
Assignee | Philip Race [ prr ] |
Status | New [ 10000 ] | Open [ 1 ] |
Summary | Java SDK 9 hidpi rescaling | Image scaling is bad with D3D pipeline |
Assignee | Philip Race [ prr ] | Prahalad Kumar Narayanan [ pnarayanan ] |
Labels | dcspks hidpi regression reproducer-yes webbug | dcspks hidpi regression reproducer-yes sn_5 webbug |
Status | Open [ 1 ] | In Progress [ 3 ] |
Introduced In Version | 9 [ 14949 ] |
Assignee | Prahalad Kumar Narayanan [ pnarayanan ] | Pardeep Sharma [ pardesha ] |
Affects Version/s | 10 [ 16302 ] |
Assignee | Pardeep Sharma [ pardesha ] | Prahalad Kumar Narayanan [ pnarayanan ] |
Labels | dcspks hidpi regression reproducer-yes sn_5 webbug | dcspks hidpi regression reproducer-yes sn_5 sn_6 webbug |
Fix Version/s | 11 [ 18723 ] | |
Fix Version/s | 10 [ 16302 ] |
Labels | dcspks hidpi regression reproducer-yes sn_5 sn_6 webbug | dcspks hidpi regression reproducer-yes sn_5 sn_6 sn_7 webbug |
Status | In Progress [ 3 ] | Open [ 1 ] |
Understanding | Cause Known [ 10000 ] |
Labels | dcspks hidpi regression reproducer-yes sn_5 sn_6 sn_7 webbug | dcspks hidpi regression reproducer-yes sn_5 sn_6 webbug |
Status | Open [ 1 ] | Resolved [ 5 ] |
Understanding | Cause Known [ 10000 ] | |
Resolution | Won't Fix [ 2 ] |
Fix Version/s | 11 [ 18723 ] |
Status | Resolved [ 5 ] | Closed [ 6 ] |
Resolution | Won't Fix [ 2 ] | |
Status | Closed [ 6 ] | Open [ 1 ] |
Fix Version/s | 11 [ 18723 ] |
Assignee | Prahalad Kumar Narayanan [ pnarayanan ] | Jayathirth D V [ jdv ] |
Status | Open [ 1 ] | In Progress [ 3 ] |
Windows 10
4k Monitor
This need to be checked for 4K monitor. When checked on display with DPI set to 175% with Resolution 1920 * 1080, couldn't reproduce the issue as reported.
The buffered images looks fine when checked with JDK 9. See attached screenshots depicting result with JDK 9 and JDK 8u144 with above mentioned resolution.
However, the results may vary with 4K monitor as reported by the submitter. Checking for required infra, meanwhile keeping this open for dev. to assess the effect.
Reported at stackoverflow:
https://stackoverflow.com/questions/46736757/disable-automatic-rescaling-of-bufferedimage-in-jdk9