Re: drawImage returns false for Microsoft Java



Thank you for replying.
You are correct. It is JAVA 1.1 but documentation is very vague on this
one something like "supported format such as GIF or JPEG" so I was
wondering if PNG was there. Do you actually know if there is a list of
supported formats for 1.1 to put this issue to rest?

And more importantly if I have bytes containing PNG image and a have to
get them displayed under java 1.1 what are my options?

Thomas Fritsch wrote:
> <igorkhalatian@xxxxxxxxxxx> wrote:
> > barray - contains byte[] array of the PNG image
> >
> > image = Toolkit.getDefaultToolkit().createImage(barray);
> >
> > MediaTracker t = new MediaTracker(this);
> > t.addImage(image, 0);
> > try {
> > t.waitForAll();
> > }
> > catch (InterruptedException e) {
> > Thread.currentThread().interrupt();
> > }
> > ...
> > ret = g.drawImage(image, x,y, this);
> >
> > THIS WORKS FINE IN JUN JAVA but in Microsoft JVM drawImage always
> > returns false.
> > Any help is greatly appreciated.
> >
> It is probably because Microsoft's JVM doesn't support PNG images.
> If I remember it correctly, the MS-JVM is java-version 1.1. And back in
> those days Java (both Sun and MS) only supported JPEG and GIF images.
>
> --
> "TFritsch$t-online:de".replace(':','.').replace('$','@')

.



Relevant Pages

  • Re: drawImage returns false for Microsoft Java
    ... It is JAVA 1.1 but documentation is very vague on this one something like "supported format such as GIF or JPEG" so I was wondering if PNG was there. ...
    (comp.lang.java.gui)
  • Re: Help!! Cant display ImageIcon!
    ... > supported in Java. ... Ehh.. ... > Choosy mothers prefer Gif. ... The patent on GIF's ran out recently, so I am not sure what ...
    (comp.lang.java.gui)
  • Re: Image in Jar file
    ... > If I don't compress the jar file, the gif can be displayed correctly. ... > If I compress the jar, I can't get the gif images correct. ... http://uio.dev.java.net Unified I/O for Java ...
    (comp.lang.java.programmer)
  • Re: How can I convert PDF, TIF, or JPG to GIF in java?
    ... resizing) image files that are in PDF, TIF, or JPG format into GIF ... Java did not add GIF writing capabilities until Java 1.5/1.6. ...
    (comp.lang.java.programmer)
  • Looking for GIF library in the ports collection
    ... for a GIF library and found -- nothing. ... don't support PNG.) ... "I learned Java 3 years before Python. ...
    (freebsd-questions)