私はJavaの画像機能のいくつかを試して、ある画像を別の画像に重ね合わせようとしています。そのようです:
BufferedImage background = javax.imageio.ImageIO.read(
new ByteArrayInputStream(getDataFromUrl(
"https://www.google.com/intl/en_ALL/images/logo.gif"
))
);
BufferedImage foreground = javax.imageio.ImageIO.read(
new ByteArrayInputStream(getDataFromUrl(
"https://upload.wikimedia.org/wikipedia/commons/e/e2/Sunflower_as_gif_small.gif"
))
);
WritableRaster backgroundRaster = background.getRaster();
Raster foregroundRaster = foreground.getRaster();
backgroundRaster.setRect(foregroundRaster);
基本的に、私はこれを重ね合わせようとしていました: https://upload.wikimedia.org/wikipedia/commons/e/e2/Sunflower_as_gif_small.gif
on this:https : //www.google.com/intl/en_ALL/images/logo .gif
製品は次のように表示されます:http://imgur.com/xnpfp.png
私が見た例から、これは適切な方法のようです。私は一歩を逃していますか?これを処理するためのより良い方法はありますか?ご回答ありがとうございます。