JavaFX: Fastest way to write pixels to PixelWriter

旧巷老猫 提交于 2019-12-05 10:46:40

For the performance of the pixel writer it is absolutely crucial that you pick the right pixel format. You can check what the native pixel format is via

pw.getPixelFormat().getType()

On my Mac this is PixelFormat.Type.BYTE_BGRA_PRE. If your raw data conforms to this pixel format, then the transfer to the image should be pretty fast. Otherwise the pixel data has to be converted and that takes some time.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!