Messages of subject
resize() in headless environment ? |
mgrig
Location : München
Member since : Jul 29, 2003
Messages : 1
|
Jul 29, 2003 at 12:23 PM
I am using RedHat Linux 9, Java2 1.4.2, Tomcat 4.1.24, PJA 2.5
and I try to load an image from a file, resize it and then output it from my servlet.
There is no X server running.
The image loads ok, but the servlet blocks when I try to resize it.
Does anyone have an idea of why this happens?
The critical part of the servlet looks like this:
Frame dummyFrame = new Frame();
dummyFrame.addNotify();
Image image = dummyFrame.createImage(imageWidth, imageHeight);
Graphics g = image.getGraphics();
while (g.drawImage(map.image, 0, 0, null) == false)
try {
Thread.sleep(50);
} catch (InterruptedException e) {}
image = resize(image, map.imageWidth, map.imageHeight); // BLOCKS HERE
Thanks,
marian
p.s. By the way, it also blocks if I try to make a
dummyFrame.dispose();
|
Manu
Location : Paris / France
Member since : Apr 29, 2003
Messages : 394
|
Aug 1, 2003 at 9:21 AM
> image = resize(image, map.imageWidth, map.imageHeight); // BLOCKS HERE
What is exactly doing this resize method ? --- Manu (moderator/modérateur)
|
meres
Member since : Nov 5, 2003
Messages : 1
|
Nov 5, 2003 at 1:24 PM
> > image = resize(image, map.imageWidth, map.imageHeight); // BLOCKS HERE
>
> What is exactly doing this resize method ?
[Message from Moderator : Missing part of the message ?]
|