package de.tutorials;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
public class Test07 {
public static void main(String[] args) {
try {
BufferedImage img = ImageIO.read(new File("c:/Wasserlilien.jpg"));
BufferedImage partImg = img.getSubimage(0, 0, 100, 100);
ImageIO.write(partImg, "jpeg", new File("c:/wasserlil_small.jpg"));
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}