JDK-8007159 : [macosx] No color correction in Java 1.7 on Mac
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 7u9
  • Priority: P3
  • Status: Closed
  • Resolution: Not an Issue
  • Submitted: 2013-01-30
  • Updated: 2013-08-01
  • Resolved: 2013-08-01
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8
8Resolved
Related Reports
Cloners :  
Description
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 ----------
Comments
jdk7 works the same as jdk6 -Dapple.awt.graphics.UseQuartz=false
01-08-2013