Is there any JavaFX Image editor?

随声附和 提交于 2019-12-01 00:42:32
jewelsea

You can use a JavaFX canvas to do this as shown in the Canvas Tutorial "Interacting with the User" section. You don't need a java.awt.Canvas.

You can take a snapshot of a canvas (or any other node) to create an image.

You can read a pixel map from an existing image using a PixelReader and write to an image's pixel map using a PixelWriter obtained from a WritableImage as shown in the ImageOps tutorials.

To write your resultant image to disk, convert it to a BufferedImage and write it out using ImageIO.

If you need it, there are samples of scaling images to a pixelated form (similar to the zoom function in Microsoft Paint): JavaFX ImageView without any smoothing.

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