JDK-8101141 : Image Ops
  • Type: Enhancement
  • Component: javafx
  • Sub-Component: graphics
  • Affected Version: fx2.0
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2011-10-13
  • Updated: 2015-06-16
  • Resolved: 2012-05-17
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 7
7u6Fixed
Related Reports
Blocks :  
Blocks :  
Blocks :  
Blocks :  
Duplicate :  
Duplicate :  
Duplicate :  
Relates :  
Relates :  
Relates :  
Description
Provide a core set of pixel-based image manipulation methods on JavaFX Image similar to that provided by BufferedImage. Also provide public API for converting to/from a BufferedImage.
Comments
Note that RT-21866 was filed to track the development of unit tests.
27-06-2012

Please provide unit tests information as specified in http://wiki.se.oracle.com/display/JPGC/How+to+specify+unit+tests+for+a+resolved+issue
27-06-2012

verified in b13
22-06-2012

The changesets are in the graphics scrum and have not been integrated into the main repository, that should happen today. The new API is: new classes javafx.image.{PixelReader,PixelWriter,PixelFormat,WritableImage}. new methods Image.getPixelReader() and WritableImage.getPIxelWriter() There is no new utility class for this push, the new conversion utility is being added under RT-21639.
22-05-2012

I can't see the changesets - can you please list the new api?
22-05-2012

Fixed with the following 2 changesets: For the rt/ reponsitory: changeset: 1057:3440e9a39f0a date: Thu May 17 16:15:50 2012 -0700 summary: Fix RT-17409: Image Ops to enable pixel access to Image nodes. for the rt-closed/ repository: changeset: 16082:df3d81150c12 date: Thu May 17 16:16:17 2012 -0700 summary: Fix RT-17409: Image Ops to enable pixel access to Image nodes.
17-05-2012

IMO we need a possibilty to share a FX Image with native code so that we can set the fx image to point to a memory space where the image data is. I would like to create a new fx image with a ByteBuffer of pixel data. This ByteBuffer pointer I want to give the native code (e.g. OpenGL) to paint the image to the screen.
20-04-2012

For consistency sake, I believe if we add this support for the JavaFX/Swing interop we should add (at some point) the same support for the JavaFX/SWT interop. Should we have a separate problem report for the JavaFX/SWT Image Ops case ?
17-04-2012

Here are the raw notes on image ops from a meeting we had to scope out the desired functionality (not the final API). API --- public class javafx.ext.swing.SwingUtils { JFXImage toImage(BufferedImage) JFXImage toImage(BufferedImage, JFXImage) BufferedImage fromImage(JFXImage) BufferedImage fromImage(JFXImage, BufferedImage) // VolatileImage ??? // Color ??? } Image { Image(int w, int h) // Construct an empty image Color readPixel(int x, int y) void writePixel(int x, int y, Color) // We need something like the following (maybe ByteBuffer instead of byte array): byte[] readPixels(int x, int y, int w, int h) byte[] readPixels(int x, int y, int w, int h, byte[]) void writePixels(int x, int y, int w, int h, byte[]) // And possibly something like this: ImageData readPixels(int x, int y, int w, int h) ImageData readPixels(int x, int y, int w, int h, ImageData) void writePixels(int x, int y, int w, int h, ImageData) } public class javafx.scene.image.ImageData { // TBD, may or may not do this for 2.2 } QUESTIONS: 1) What about VolatileImage as an addition to SwingUtils class? 2) What should the name of the SwingUtils class be? 3) Do we need variants of to/from BufferedImage that work on sub-images or is it OK to just use the BufferedImage sub-image operators? 6) For Image operation: OK to use single format for now? 7) Don't want to preclude > 8-bits per pixel images in the future 8) Need ability to specify image format for expert mode (probably just in the ImageData case) 9) Would like to call the methods on Image get/set but that implies "properties", so propose using read/write instead; is this OK?
26-03-2012

Implements A360 Feature http://oracleplan.oracle.com/gotoEntity?entityType=FEATURE&entityId=708329
26-03-2012