JDK-8091877 : GraphicsContext - should allow to control interpolation when drawing images
  • Type: Enhancement
  • Component: javafx
  • Sub-Component: graphics
  • Affected Version: 7u15
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2013-02-26
  • Updated: 2018-11-13
  • Resolved: 2018-11-13
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.
Other
tbdResolved
Related Reports
Duplicate :  
Description
When drawing an image in a GraphicsContext using the drawImage() method to enlarge a small image to a larger canvas, the image is being interpolated (possibly using a bilinear or bicubic algorithm).
But there are times like when rendering color maps (temperature, zooplancton, salinity, etc.) or some geographical data (population concentration, etc.) where we want to have no interpolation at all (ie: use the nearest neighbor algorithm instead) in order to represent accurate data and shapes.

In Java2D, this is possible by setting the appropriate RenderingHints.KEY_RENDERING on the Graphics2D at hand.
Currently on JavaFX's GraphicsContext there is no such way to specify how the image is to be interpolated.

The same applies when shrinking images too.

This could be expanded to support a better form of smoothing for the "smooth" value that is available in both Image and ImageView and that does not seem to work very well currently (at least on Windows).
Comments
Closing as duplicate of JDK-8204060 (fix in progress).
13-11-2018

Consider for future version of FX.
05-03-2013