Proposal for Enhancement to PixelBuffer/WritableImage to support pixelScale

Tom Schindl tom.schindl at bestsolution.at
Thu Dec 2 10:35:01 UTC 2021


Hi,

I'm try to get a HiDPI-Image produced by an external application into 
JavaFX using WritableImage.

In the end the situation is comparable to what you get today when 
loading an image from an URL (eg sample at 2.png) where JavaFX sets the 
appropriate image pixelScale on "com.sun.prism.Image".

If I'm not completely mistaken I would need an new API on PixelBuffer to 
containing the pixelScale who is used QuantumImage to create an 
appropriate "com.sun.prism.Image" who has eg the pixelScale = 2.0 
because I fed in a HiDPI-Image already.

Before filing an ehancement I wanted to bring this up here because maybe 
I'm missing something obvious or maybe my proposal makes totally no sense.

Tom


More information about the openjfx-dev mailing list