This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
hi folks, is it possible to get the image dimension from an image file? my webapp allows user to upload image file and then display it. The issue here is that I need to shrink the image file proportionally to create a thumbnail and display these thumbnails in a table. thanks!!
You can load it as a BufferedImage with ImageIO (j2se 1.4+) and get the dimensions with the BufferedImage getWidth/Height methods and use this to scale the images to final size. If using an older loading method (eg, ImageIcon, Toolkit getImage) you may need an ImageObserver (any Component) to get the dimensions.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com