Yes… I’m one of many java newbies who just can’t seem to be able to load an image right.
So on to the Question:
I was using Toolkit.getDefaultToolkit().getImage(…) to
load an image until one day i discovered it had asynchronous loading and so the drawing of a 1024x768 image wasn’t exactly a great spectacle.
I tried to slip past this little glitch by drawing the acquired image to a BufferedImage and the on to the graphics object…
Darkness…The output was a (completely) black image.
But this could not daunt me (yet…). So i tried ImageIO.read(…). And yes ,the loading was synchronous. But the image had transparent spots (.gif) which were black…(using the previous method no such problem occured) .
I know i’m doing something wrong in both of these methods…so if it’s obvious by the above storytelling ,tell me. If not, say which code segment i should post.
Thanks guys