getting image size

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kaleeswaran
    New Member
    • Mar 2007
    • 132

    #1

    getting image size

    hi!
    i am storing image into data base.but before i want to insert into the image i should check out the image size..please give me some idea...
    thank you,
  • dmjpro
    Top Contributor
    • Jan 2007
    • 2476

    #2
    Originally posted by kaleeswaran
    hi!
    i am storing image into data base.but before i want to insert into the image i should check out the image size..please give me some idea...
    thank you,
    Have a look at this code.

    [code=java]
    File f = new File("file_loca tion");
    System.out.prin tln(f.length()) ;
    [/code]

    Dmjpro.

    Comment

    • JosAH
      Recognized Expert MVP
      • Mar 2007
      • 11453

      #3
      Originally posted by kaleeswaran
      hi!
      i am storing image into data base.but before i want to insert into the image i should check out the image size..please give me some idea...
      thank you,
      If you can get your image as an Image you can use the getWidth() and
      getHeight() methods.

      kind regards,

      Jos

      Comment

      Working...