Re: finding jpeg dimensions
Re: finding jpeg dimensions
- Subject: Re: finding jpeg dimensions
- From: David Teran <email@hidden>
- Date: Thu, 14 Oct 2004 23:20:58 +0200
Hi,
I can't find any previous post from you, but you can get the
dimensions by creating a BufferedImage instance from your JPEG file.
See the Javadocs for ImageIO (Package javax.imageio).
You need to do something like this (incomplete and unchecked):
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...
regards David
_______________________________________________
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