Home pageFind It!Contact PJAPJA documentation

PJA

 PJA Toolkit forum

This forum is dedicated to PJA Toolkit.
You may read freely the messages it contents. If you want to write a message or answer to a subject, subscribe to it first.

Subjects Recent messages Login Subscribe

Messages of subject PJAImage (producer) don't work

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);
}

Manu

Location : Paris / France
Member since : Apr 29, 2003
Messages : 394
 Sep 21, 2003 at 6:10 PM
I checked the code of PJAImage and don't see any problem... Image production is correctly synchronized before consumers are delivered the content of the image.
Maybe it's a bug due to the use of an intermediate producer FilteredImageSource.
Could you test it without a filter ?
What is exactly doing your toBufferedImage method ?
---
Manu (moderator/modérateur)


Home pageFind It!ContactTop

© Copyrights 1997-2014 eTeks - All rights reserved

PJAPJA documentation