public class ReplicateScaleFilter extends ImageFilter
这意味着使用一个filteredimagesource对象产生现有的图像缩放版本的结合。由于实现依赖关系,可能会有不同的平台上的图像的像素值的差异。
FilteredImageSource,
ImageFilter
| Modifier and Type | Field and Description |
|---|---|
protected int |
destHeight
目标高度缩放图像。
|
protected int |
destWidth
目标宽度缩放图像。
|
protected Object |
outpixbuf
|
protected int[] |
srccols
包含一列像素
int阵列。
|
protected int |
srcHeight
源图像的高度。
|
protected int[] |
srcrows
包含一行的像素信息的一种
int阵列。
|
protected int |
srcWidth
源图像的宽度。
|
consumerCOMPLETESCANLINES, IMAGEABORTED, IMAGEERROR, RANDOMPIXELORDER, SINGLEFRAME, SINGLEFRAMEDONE, SINGLEPASS, STATICIMAGEDONE, TOPDOWNLEFTRIGHT| Constructor and Description |
|---|
ReplicateScaleFilter(int width, int height)
构建了一个replicatescalefilter,尺度从源图像的像素指定的宽度和高度参数。
|
| Modifier and Type | Method and Description |
|---|---|
void |
setDimensions(int w, int h)
重写了源图像的尺寸和通过新尺寸的尺寸的imageconsumer。
|
void |
setPixels(int x, int y, int w, int h, ColorModel model, byte[] pixels, int off, int scansize)
选择所提供的字节像素的行和列所需的目标缩放图像,并通过只是那些需要的行和列,复制必要。
|
void |
setPixels(int x, int y, int w, int h, ColorModel model, int[] pixels, int off, int scansize)
选择的行和列的像素传递int需要目的地缩放图像和通过这些行和列是需要的,复制是必要的。
|
void |
setProperties(Hashtable<?,?> props)
在添加应用程序的规模后,从源对象的属性传递。
|
clone, getFilterInstance, imageComplete, resendTopDownLeftRight, setColorModel, setHintsprotected int srcWidth
protected int srcHeight
protected int destWidth
protected int destHeight
protected int[] srcrows
int阵列。
protected int[] srccols
int阵列。
protected Object outpixbuf
public ReplicateScaleFilter(int width,
int height)
width -缩放图像的目标宽度
height -缩放图像目标的高度
IllegalArgumentException -如果
width
height等于零或等于零
public void setProperties(Hashtable<?,?> props)
super.setProperties,这可能会导致额外的属性被添加。
注:此方法用于被其像素被过滤的Image的ImageProducer。开发人员使用这个类来过滤图像中的像素应该避免直接调用这个方法,因为该操作可能会干扰滤波操作。
setProperties 接口
ImageConsumer
setProperties 方法重写,继承类
ImageFilter
props -从源对象的属性
public void setDimensions(int w,
int h)
注:此方法用于被其像素被过滤的Image的ImageProducer。开发人员使用这个类来过滤图像中的像素应该避免直接调用这个方法,因为该操作可能会干扰滤波操作。
setDimensions 接口
ImageConsumer
setDimensions 方法重写,继承类
ImageFilter
w -源图像的宽度
h -源图像的高度
ImageConsumer
public void setPixels(int x,
int y,
int w,
int h,
ColorModel model,
byte[] pixels,
int off,
int scansize)
注:此方法用于被其像素被过滤的Image的ImageProducer。开发人员使用这个类来过滤图像中的像素应该避免直接调用这个方法,因为该操作可能会干扰滤波操作。
setPixels 接口
ImageConsumer
setPixels 方法重写,继承类
ImageFilter
x的x坐标的像素区域的左上角是集
y的像素区域的左上角要设置的Y坐标
w -像素区域的宽度
h -像素区域的高度
model -指定
ColorModel
pixels -像素阵列
pixels阵列
off -
scansize -从一行像素的距离在
pixels阵下
ImageConsumer.setPixels(int, int, int, int, java.awt.image.ColorModel, byte[], int, int)
public void setPixels(int x,
int y,
int w,
int h,
ColorModel model,
int[] pixels,
int off,
int scansize)
注:此方法用于被其像素被过滤的Image的ImageProducer。开发人员使用这个类来过滤图像中的像素应该避免直接调用这个方法,因为该操作可能会干扰滤波操作。
setPixels 接口
ImageConsumer
setPixels 方法重写,继承类
ImageFilter
x的x坐标的像素区域的左上角是集
y的像素区域的左上角要设置的Y坐标
w -像素区域的宽度
h -像素区域的高度
model -指定
ColorModel
pixels -像素阵列
off -偏移到
pixels阵列
scansize -从一行像素的距离在
pixels阵下
ImageConsumer.setPixels(int, int, int, int, java.awt.image.ColorModel, byte[], int, int)
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.