java对图片处理_Java可以对图片进行处理么?如RiSize等

想用Java程序实现对Jpg或其他格式文件的Risize操作,有这样的工具包么?用应用程序实现很简单,但Java就无从下手了!

|

用这个函数

/**

* Creates a scaled version of this image.

* A new Image object is returned which will render

* the image at the specified width and

* height by default.  The new Image object

* may be loaded asynchronously even if the original source image

* has already been loaded completely.  If either the width

* or height is a negative number then a value is

* substituted to maintain the aspect ratio of the original image

* dimensions.

* @param width the width to which to scale the image.

* @param height the height to which to scale the image.

* @param hints flags to indicate the type of algorithm to use

* for image resampling.

* @return     a scaled version of the image.

* @see        java.awt.Image#SCALE_DEFAULT

* @see        java.awt.Image#SCALE_FAST

* @see        java.awt.Image#SCALE_SMOOTH

* @see        java.awt.Image#SCALE_REPLICATE

* @see        java.awt.Image#SCALE_AREA_AVERAGING

* @since      JDK1.1

*/

public Image getScaledInstance(int width, int height, int hints)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值