JDK-8107699 : ImageView.smooth does not work
  • Type: Bug
  • Component: javafx
  • Sub-Component: graphics
  • Affected Version: fx1.2
  • Priority: P2
  • Status: Resolved
  • Resolution: Won't Fix
  • Submitted: 2009-07-29
  • Updated: 2015-06-16
  • Resolved: 2011-02-26
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Description
Setting ImageVIew.smooth appears to be ignored for the Swing stack. The Prism stack appears to do the right thing.

The attached test program draws an image that has been rotated by 4 degrees. The smooth variable is set on the ImageView which should cause the image to be antialiased.

Comments
As described, this issue cannot be fixed. A new feature request will be opened for this feature.
26-02-2011

Based on the evaluation, we may need new API to address this properly. Target for Presidio.
03-03-2010

I am reopening this bug because the original fix was not comprehensive enough; see RT-6933 for the full story.
16-12-2009

The fix has been pushed (again, only for the Prism stack, as discussed above): http://jfxsrc.sfbay.sun.com/javafx/soma/scrum/graphics/runtime/rev/63105930e08b
11-08-2009

The ImageView.smooth (and MediaView.smooth) originally only mapped to the image interpolation hints in Java2D, i.e., smooth=true meant BILINEAR and smooth=false meant NEAREST_NEIGHBOR. In Java2D, those hints only control the quality of the filtering and are somewhat unrelated to whether we antialias (or "smooth") the edges of rotated or sheared images. In Sun's implementation of Java2D we do not antialias the edges of transformed images; for more on that issue, refer to the following blog entry: http://weblogs.java.net/blog/campbell/archive/2007/03/java_2d_tricker_1.html We will not be fixing this issue for the Swing/Java2D-based implementation of JavaFX at this time, as it is difficult and would require more resources than we have available. However, it is possible to fix this for the Prism stack without much difficulty. We can do this by adjusting the src/dst regions of drawTexture() calls to expand the bounds slightly to include transparent texels around the edges, which effectively smooths the edges of rotated/sheared ImageView and MediaView nodes.
11-08-2009

Raising this to critical as it significantly impacts rendering quality.
10-08-2009

I spoke too soon about Prism. Looking at it more closely, it isn't working either. At a minimum we need to solve this for the Prism stack.
29-07-2009