8 Replies Latest reply on Mar 9, 2011 3:17 PM by 804091

    Get width and height of tiff image problem

      I have method like below , and work fine with all image type file , except for .tif , the out put for width and height will return -1 . I couldn't find the way for it . could you please advise me the way ?
          static int[] imageFileProperlies(File file) throws IOException {
              int[] i = new int[2];
              ImageIcon image = new ImageIcon(file.getAbsolutePath());
              i[0] = image.getIconWidth();
              i[1] = image.getIconHeight();
              return i;