Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Width of an image

Reply
Thread Tools

Width of an image

 
 
Armin Gajda
Guest
Posts: n/a
 
      09-19-2006
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.

--
bye Armin
 
Reply With Quote
 
 
 
 
M.J. Dance
Guest
Posts: n/a
 
      09-19-2006
Armin Gajda wrote:
> 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();
 
Reply With Quote
 
 
 
 
Chris Uppal
Guest
Posts: n/a
 
      09-19-2006
Armin Gajda wrote:

> 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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help! Fixed width table with a 100% width image in it is assuming theimages intrinsic size, although it does shrink the image satya.komatineni@gmail.com HTML 1 12-29-2007 08:32 PM
Textbox width scaling to width of data not width of page? AndrewF ASP .Net 1 10-10-2005 04:38 PM
JComboBox width, dropdown list width Xu Java 11 07-15-2005 11:54 PM
Table width and columns width kris HTML 11 11-18-2003 06:49 AM
Re: resized image in table extends table width to original image width Sean Jorden HTML 1 08-19-2003 08:59 AM



Advertisments