45 |
import java.awt.image.ImageConsumer; |
import java.awt.image.ImageConsumer; |
46 |
import java.awt.image.ImageObserver; |
import java.awt.image.ImageObserver; |
47 |
import java.awt.image.ImageProducer; |
import java.awt.image.ImageProducer; |
48 |
|
import java.awt.image.MemoryImageSource; |
49 |
import java.util.Hashtable; |
import java.util.Hashtable; |
50 |
import java.util.Vector; |
import java.util.Vector; |
51 |
|
|
71 |
|
|
72 |
public synchronized void imageComplete (int status) |
public synchronized void imageComplete (int status) |
73 |
{ |
{ |
74 |
source.removeConsumer(this); |
// we need to reuse the pixel cache for memory image sources since |
75 |
|
// a memory image's backing array can be updated "live". |
76 |
|
if (!(source instanceof MemoryImageSource)) |
77 |
|
source.removeConsumer(this); |
78 |
target.setImage(width, height, pixelCache, properties); |
target.setImage(width, height, pixelCache, properties); |
79 |
} |
} |
80 |
|
|