Hi Philipp,

as far as I know PixelWriter, WritableImage and ImageView fits better for
handling raster images than Canvas.

TestFX uses PixelWriter.setArgb() to convert screenshots from Glass with
Monocle to PNG files:

https://github.com/TestFX/TestFX/blob/fd75122/subprojects/testfx-core/src/main/java/org/testfx/service/adapter/impl/GlassRobotAdapter.java#L230

--Benjamin

On Wed, Apr 29, 2015 at 4:21 PM, Philipp Dörfler <phdoerf...@gmail.com>
wrote:

> Hello list,
>
> I got some very low level pixel data residing in memory with a pixel
> format and want to get that into JavaFX. I am talking about raw bytes, BGR,
> 24 bit per pixel etc..
> The library providing this pixel data is OpenCV and although it allows for
> encoding the data into a standard format like ".bmp" or ".png" which then
> can be read by JavaFX, I would like to avoid this extra conversion process
> because I got some real time constraints.
>
> As far as I understand this is what the PixelReader and PixelWriter
> interface is for. Is this correct? Where can I find additional information
> on how to use them besides the Javadoc? Would using the Canvas be easier?
> Can I somehow use the GraphicsContext of Canvas to do that?
> I'd be grateful for any pointers even when it's just "check out the class
> XZY in the underlying prism code: <link to bitbucket>".
>
> Thanks and best regards!
>
> Philipp Dörfler

Reply via email to