W
Wolfgang
I'm getting images from a CGI server via a URL, two lines of code
below. The first line of code just sets the URL, the second line
creates the image.
URL url = new
URL("http://www.image.com:80/cgi-bin/gal/bild.sh?id=45751&size=16");
image =
java.awt.Toolkit.getDefaultToolkit().getDefaultToolkit().createImage(url);
QUESTIONS:
==========
1) How can I determine, programamatically, of what (MIME) type the
returned image is (I suspect it's GIF, BMP or JPEG, but don't know)
2) How do I write the image to a file, as the same type as it came (no
need to transform between types).
Thanks for your help.
Wolfgang,
Santa Barbara, CA
below. The first line of code just sets the URL, the second line
creates the image.
URL url = new
URL("http://www.image.com:80/cgi-bin/gal/bild.sh?id=45751&size=16");
image =
java.awt.Toolkit.getDefaultToolkit().getDefaultToolkit().createImage(url);
QUESTIONS:
==========
1) How can I determine, programamatically, of what (MIME) type the
returned image is (I suspect it's GIF, BMP or JPEG, but don't know)
2) How do I write the image to a file, as the same type as it came (no
need to transform between types).
Thanks for your help.
Wolfgang,
Santa Barbara, CA