opening PNGs from an applet url parameter in version 1.38x

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

opening PNGs from an applet url parameter in version 1.38x

Zummy
My boss is trying to open a PNG from the applet url parameter using
version 1.38x and he is having problems.
We think this is because the default case calls
Toolkit.createImage(URL) and this doesn't handle PNGs
We think that it would be better to call ImageIO.read(URL), but we
are investigating this.  Does anyone
have a way to read PNGs from a URL in an applet?

Thanks,

John
Reply | Threaded
Open this post in threaded view
|

Re: opening PNGs from an applet url parameter in version 1.38x

Wayne Rasband
> My boss is trying to open a PNG from the applet url parameter using
> version 1.38x and he is having problems. We think this is because the
> default case calls Toolkit.createImage(URL) and this doesn't handle
> PNGs
> We think that it would be better to call ImageIO.read(URL), but we are
> investigating this.  Does anyone have a way to read PNGs from a URL
> in an applet?

Using the File>Import>URL command, the ImageJ applet at

     http://rsb.info.nih.gov/ij/applets.html

opens the PNG at

      http://rsb.info.nih.gov/ij/images/owl.png

without a problem.

-wayne
Reply | Threaded
Open this post in threaded view
|

Re: opening PNGs from an applet url parameter in version 1.38x

Zummy
http://www.libpng.org/pub/png/PngSuite

Is a good location for test PNGs.  There are some bad images there, see

http://www.libpng.org/pub/png/pngsuite.html

We're looking at 16-bit grayscale, so files ending with *g16.png
would be good to test with.

I've tested several, and I'm having problems, even with Web Start.

John
At 10:10 AM 2/14/2008, you wrote:

>>My boss is trying to open a PNG from the applet url parameter using
>>version 1.38x and he is having problems. We think this is because the
>>default case calls Toolkit.createImage(URL) and this doesn't handle PNGs
>>We think that it would be better to call ImageIO.read(URL), but we are
>>investigating this.  Does anyone have a way to read PNGs from a URL
>>in an applet?
>
>Using the File>Import>URL command, the ImageJ applet at
>
>     http://rsb.info.nih.gov/ij/applets.html
>
>opens the PNG at
>
>      http://rsb.info.nih.gov/ij/images/owl.png
>
>without a problem.
>
>-wayne