This seems to be due to a typo.
In response, the link to the code that generated the combined image was
Graphics2D g = finalImage.createGraphics(); g.drawImage(bgImage, 0, 0, null); g.drawImage(fgImage, 0, 0, null);
But in this matter he was changed to
Graphics2D g = finalImage.createGraphics(); g.drawImage(bgImageJpeg, w, h, null); g.drawImage(fgImage, w, h, null);
The latter begins to draw on the "upper left corner" , which, it turns out, is located in the lower right corner of the image, so nothing has been done. The first, however, paints all the images as expected.
source share