0
我有兩個TIF文件,一個是背景(疊加),另一個是前景。以下代碼目前用於組合兩個TIF。什麼是從後臺創建TIF圖像的高性能TIF和前景TIF在java中
// Background color of foreground image
int w = Color.WHITE.getRGB();
// Fill all pixels which are not background color
for (int i = 0; i < foregroundImage.getWidth(); i++)
{
for (int j = 0; j < foregroundImage.getHeight(); j++)
{
int x = foregroundImage.getRGB(i, j);
if (x != w)
backgroundImage.setRGB(i, j, x);
}
}
是否有任何其他方式有更好的性能來做到這一點?
我試過了,但它仍然不起作用! – Caliboy