• Post Reply Bookmark Topic Watch Topic
  • New Topic

Image Resizing in Java

 
Nedave Chan
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all

I am trying to create a image cropping tool in Java. I will need to retrieve the width and the height of the image. The cropping tool will need to trim the edges from the top right bottom and left (meaning I will b getting 4 values). All the data will then be passed to a servlet. Anyone knows how to get me started writing the servlet codings?

Regards
Nedave
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

The javax.imageio.ImageIO.read method will provide you with a BufferedImage object, which you can query for the image's height and width, and use for image modifications. Some simple examples can be found here.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!