MysticVoice
Location : Karlsruhe/Germany
Member since : Aug 27, 2003
Messages : 1
|
Aug 27, 2003 at 5:04 PM
hi,
if I use PJAImage (producer) i got an white ("empty") image.
if I use the awt toolkit (switch [1] and [2]) it works fine.
what's wrong?
thanks.
private BufferedImage scaleImage(Image sourceImage, int width, int height)
{
ImageFilter filter = new ReplicateScaleFilter(width,height);
ImageProducer producer = new FilteredImageSource (sourceImage.getSource(), filter );
[1] Image resizedImage = new com.eteks.awt.PJAImage (producer);
[2] //Image resizedImage = Toolkit.getDefaultToolkit().createImage(producer);
return this.toBufferedImage(resizedImage);
}
|