Width of an image

Discussion in 'Java' started by Armin Gajda, Sep 19, 2006.

  1. Armin Gajda

    Armin Gajda Guest

    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
    Armin Gajda, Sep 19, 2006
    #1
    1. Advertising

  2. Armin Gajda

    M.J. Dance Guest

    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();
    M.J. Dance, Sep 19, 2006
    #2
    1. Advertising

  3. Armin Gajda

    Chris Uppal Guest

    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
    Chris Uppal, Sep 19, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. AndrewF
    Replies:
    1
    Views:
    773
    Bruce Barker
    Oct 10, 2005
  2. Xu
    Replies:
    11
    Views:
    8,554
    Andrew Thompson
    Jul 16, 2005
  3. Sean Jorden
    Replies:
    1
    Views:
    594
    laurie
    Aug 19, 2003
  4. kris
    Replies:
    11
    Views:
    873
  5. Replies:
    1
    Views:
    740
    Beauregard T. Shagnasty
    Dec 29, 2007
Loading...

Share This Page