Re: finding jpeg dimensions
Re: finding jpeg dimensions
- Subject: Re: finding jpeg dimensions
- From: Dirk Bajohr <email@hidden>
- Date: Fri, 15 Oct 2004 00:36:35 +0200
File imageFile; //assume this exists
BufferedImage img = javax.imageio.ImageIO.read(imageFile);
int height = img.getHeight();
int width = img.getWidth();
Does this work with CMYK Jpeg images, too? Sorry for being to lazy
trying it out...
Hi David,
I tried it for you with a CMYK Jpeg and it said:
javax.imageio.IIOException: Unsupported Image Type
at
com.sun.imageio.plugins.jpeg.JPEGImageReader.readInternal(JPEGImageReade
r.java:878)
at
com.sun.imageio.plugins.jpeg.JPEGImageReader.read(JPEGImageReader.java:
853)
at javax.imageio.ImageIO.read(ImageIO.java:1384)
at javax.imageio.ImageIO.read(ImageIO.java:1270)
...
This is OSX, Apple's latest JDK 1.4.2 Update 2 (Sept. 24, 2004).
Regards,
Dirk
--
Dirk Bajohr
iSOLUTION - Individuelle Software fuer moderne Kommunikation
Hauptstr. 50
53757 Sankt Augustin
T +49 2241 921567-0
F +49 2241 921567-89
http://www.isolution.de
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden