import javax.swing.ImageIcon;
public void printSize(){
ImageIcon jpegImage = new
ImageIcon("C:\\Users\\prageethj\\Desktop\\cute.jpg");
int height = jpegImage.getIconHeight();
int width = jpegImage.getIconWidth();
System.out.println(width + "x" + height);
}
public void printSize(){
ImageIcon jpegImage = new
ImageIcon("C:\\Users\\prageethj\\Desktop\\cute.jpg");
int height = jpegImage.getIconHeight();
int width = jpegImage.getIconWidth();
System.out.println(width + "x" + height);
}
No comments:
Post a Comment