Java: reading, converting and resizing of images

I need to read image in java. Then I should to convert it to 565RGB In addition it would be good to resize this image to 320 x 240. How should I do it? Help me please. I know such information: 1)It is possible to read image by its URL. ImageIcon imgThisImg = new ImageIcon(imageURL); 2) It is possible to create image instances that supports 565RGB. BufferedImage bufImg = new BufferedImage(320, 240, BufferedImage.TYPE_USHORT_565_RGB); 3)BufferedImage inherits ImageIcon , so it is possible to perform such operation Image imgPicture ... BufferedImage bufImg = (BufferedImage) imgPicture; But I haven't any idea, will `bufImg` in this case have `BufferedImage.TYPE_USHORT_565_RGB format`? How to stretch, to squeeze or to cut this picture to get size 320 x 240?

以上就是Java: reading, converting and resizing of images的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准