-
Bug
-
Resolution: Unresolved
-
P3
-
8, 10, 11
-
x86
-
os_x
ADDITIONAL SYSTEM INFORMATION :
macOS 10.13.5, tested with Java 1.8, 10.0.1 and 11-ea.
A DESCRIPTION OF THE PROBLEM :
I am using macOS 10.13.5 on a Macbook pro 2015. In my application I am using the Robot class to take a screenshot of a part of the screen. When I display the BufferedImage it ist blurred/unsharp and does not correspond to the original image. Screenshots taken with other (not JAVA) applications do not show this problem.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Use Robot.createScreenCapture on an Retina display under macOS, and display the buffered image. Here are three images which display the problem: https://schrell.de/java-bug
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
a one to one image
ACTUAL -
a blurred image which is not identical to the original screen
---------- BEGIN SOURCE ----------
import java.awt.AWTException;
import java.awt.Rectangle;
import java.awt.Robot;
import java.awt.image.BufferedImage;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JLabel;
public class Test extends JFrame {
private static final long serialVersionUID = 1802199483736051124L;
public static void main(final String[] args) throws AWTException {
final Robot robot = new Robot();
final BufferedImage bufferedImage = robot.createScreenCapture(new Rectangle(0, 0, 200, 200));
final JFrame imFrame = new Test();
imFrame.add(new JLabel(new ImageIcon(bufferedImage)));
imFrame.setSize(bufferedImage.getWidth() + 50,
bufferedImage.getHeight() + 50);
imFrame.pack();
imFrame.setVisible(true);
}
}
---------- END SOURCE ----------
FREQUENCY : always
macOS 10.13.5, tested with Java 1.8, 10.0.1 and 11-ea.
A DESCRIPTION OF THE PROBLEM :
I am using macOS 10.13.5 on a Macbook pro 2015. In my application I am using the Robot class to take a screenshot of a part of the screen. When I display the BufferedImage it ist blurred/unsharp and does not correspond to the original image. Screenshots taken with other (not JAVA) applications do not show this problem.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Use Robot.createScreenCapture on an Retina display under macOS, and display the buffered image. Here are three images which display the problem: https://schrell.de/java-bug
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
a one to one image
ACTUAL -
a blurred image which is not identical to the original screen
---------- BEGIN SOURCE ----------
import java.awt.AWTException;
import java.awt.Rectangle;
import java.awt.Robot;
import java.awt.image.BufferedImage;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JLabel;
public class Test extends JFrame {
private static final long serialVersionUID = 1802199483736051124L;
public static void main(final String[] args) throws AWTException {
final Robot robot = new Robot();
final BufferedImage bufferedImage = robot.createScreenCapture(new Rectangle(0, 0, 200, 200));
final JFrame imFrame = new Test();
imFrame.add(new JLabel(new ImageIcon(bufferedImage)));
imFrame.setSize(bufferedImage.getWidth() + 50,
bufferedImage.getHeight() + 50);
imFrame.pack();
imFrame.setVisible(true);
}
}
---------- END SOURCE ----------
FREQUENCY : always