FULL PRODUCT VERSION :
Java(TM) SE Runtime Environment (build 1.7.0_09-b05)
ADDITIONAL OS VERSION INFORMATION :
Mac OS X Lion (10.7.4)
A DESCRIPTION OF THE PROBLEM :
There are no color correction in Java 1.7. The reason is probably that the system property -Dapple.awt.graphics.UseQuartz is no longer supported.
REGRESSION. Regression from Apple's Java 6
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Try to run the snippet ColorCorrectionDemo. First on Java 1.7 and then on Java 1.6. You will notice that the colors in Java 1.7 are much more saturate than in Java 1.6.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Color correction should be performed.
ACTUAL -
There are no color correction.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.awt.Color;
import java.awt.Container;
import java.awt.FlowLayout;
import java.awt.Graphics2D;
import java.awt.Rectangle;
import java.awt.image.BufferedImage;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JLabel;
public final class ColorCorrectionDemo extends JFrame{
public ColorCorrectionDemo() {
super("Color correction demo.");
final Container container = getContentPane();
container.setLayout(new FlowLayout());
add(new JLabel(new ImageIcon(createImage(Color.RED))));
add(new JLabel(new ImageIcon(createImage(Color.GREEN))));
add(new JLabel(new ImageIcon(createImage(Color.BLUE))));
setSize(400, 100);
setVisible(true);
}
private BufferedImage createImage(final Color color) {
final BufferedImage image = new BufferedImage(50, 50, BufferedImage.TYPE_INT_RGB);
final Graphics2D graphics2D = image.createGraphics();
graphics2D.setColor(color);
graphics2D.fill(new Rectangle(50, 50));
return image;
}
public static void main(final String args[]) {
final ColorCorrectionDemo test = new ColorCorrectionDemo();
test.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
}
---------- END SOURCE ----------