Hi Everyone,
This is kind of a continuation of a previous post. My application is now using ImageIcons to access information about a number of pictures. I am able to successfully "load" the pictures however when I use the methods "getIconHeight()" and "getIconWidth()" to determine the heights and widths of my pictures I simply get -1's returned across the board. The API documentation for ImageIcon isn't great, but from reading the docs on the Image class I believe that my -1's are the result of:
".... (height / width) is not yet known, this method returns -1 and the specified ImageObserver object is notified later."
If anybody out there can help me with determining the real height and width (as opposed to the most unhelful -1) I will be really appreciative. Thanks heaps for your assistance.
Regards
David
This is kind of a continuation of a previous post. My application is now using ImageIcons to access information about a number of pictures. I am able to successfully "load" the pictures however when I use the methods "getIconHeight()" and "getIconWidth()" to determine the heights and widths of my pictures I simply get -1's returned across the board. The API documentation for ImageIcon isn't great, but from reading the docs on the Image class I believe that my -1's are the result of:
".... (height / width) is not yet known, this method returns -1 and the specified ImageObserver object is notified later."
If anybody out there can help me with determining the real height and width (as opposed to the most unhelful -1) I will be really appreciative. Thanks heaps for your assistance.
Regards
David