Außerdem unten aufgeführt :
versuchen {
String targetImg = "D:/Blue Hills.jpg";
// String pressImg = "D:/20130311220300.jpg";
String pressImg = "D:/html_original.jpg";
Datei f1 = neue Datei(targetImg);
Image src = ImageIO. read(f1);
int width = src.getWidth(null);
int height = src. getHeight(null);
BufferedImage image = new BufferedImage (width, height, BufferedImage. TYPE_INT_RGB);
Grafiken g = image.createGraphics();
g.drawImage(src, 0, 0, width, height, null);
Datei f2 = neue Datei (pressImg);
Bild src_pao = ImageIO.read(f2);
int width_pao = src_pao.getWidth(null);
int height_pao = src_pao.getHeight(null);
g.drawImage(src_pao, (width-+pao_width)/2, (height-pao_height)/2,pao_width,pao height, null);
// g. drawImage (src_pao, 100, 100, width, height, null);
g.dispose();
FileOutputStream out = new FileOutputStream(targetImg);
JPEGImageEncoder-Encoder = JPEGCodec.createJPEGEncoder(out);
Encoder.encode(image);
out.close();
System.out.println("Nummernschild ausgeben!!");
} Catch (Ausnahme e) {
// TODO: Ausnahme behandeln
System.out.println("Unterhaltungszauber!!");
e.printStackTrace();
} }