Forums Register Login

Image Observer

+Pie Number of slices to send: Send
Hello,
I'm implementing/attempting to implement Image Observer in a servlet to draw an image


and have implementation for the method imageUpdate( java.awt.Image image, int flags, int x, int y, int width, int height).
The method does get called and executed. In log, I can see it attempting to wait for the .drawImage call to finish, but the image never gets drawn.
Does anyone know anything about this? Thanks in advance.
Here is the imageUpdate - The lines that show up in the log are 0,4 and 7 - AND NOTHING ELSE!
+Pie Number of slices to send: Send
Instead of using an ImageObserver you can make sure that all of your image instances are instances of BuffereImage. A BufferedImage, contrary to the ToolkitImage, is guaranteed to be loaded synchronously.
+Pie Number of slices to send: Send
Also note: when you do use a BufferedImage (which, for instance, is created for you if you load images via ImageIO, or which you can create from scratch in various ways), then you should pass null as the ImageObserver argument to drawImage:



Chet.
I guess everyone has an angle. Fine, what do you want? Just know that you cannot have this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 3059 times.
Similar Threads
why is an interface's varable static, and a method not allowed to be static?
Java- Image height required
Image Dimensions
problem while displaying multipage tiff image in applet
Resizing Large JPG Problem
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 10:58:35.