Hi,
what is the easiest way to get the width of an image (png or jpg).
I don't want to show the image or do anything else with it (I not even
have a gui). It's just the width I need.

Signature
bye Armin
M.J. Dance - 19 Sep 2006 14:32 GMT
> Hi,
>
> what is the easiest way to get the width of an image (png or jpg).
> I don't want to show the image or do anything else with it (I not even
> have a gui). It's just the width I need.
ImageIO.read(...).getWidth();
Chris Uppal - 19 Sep 2006 14:55 GMT
> what is the easiest way to get the width of an image (png or jpg).
> I don't want to show the image or do anything else with it (I not even
> have a gui). It's just the width I need.
If the idea is to avoid the expense of parsing/loading the image data itself,
then you might want to look at Marco Schmidt's ImageInfo at:
http://schmidt.devlib.org/index.html
-- chris