Java examples for JavaFX:Image
get Sub JavaFX Image
//package com.java2s; import javafx.scene.image.Image; import javafx.scene.image.PixelReader; import javafx.scene.image.WritableImage; public class Main { public static Image getSubImage(Image img, int x, int y, int w, int h) { PixelReader reader = img.getPixelReader(); WritableImage image = new WritableImage(reader, x, y, w, h); return image; }/*from w w w.ja va2s .c om*/ }