java命名空间javax.imageio类imagewriter的类成员方法:
preparereplacepixels定义及介绍
本文导语:
preparereplacepixels
public void preparereplacepixels(int imageindex,
rectangle region)
throws ioexception
准备好 writer,处理一系列对 replacepixels 方法的调用。将根据所提供的数据来剪切受影响的像素区...
preparereplacepixels
public void preparereplacepixels(int imageindex,
rectangle region)
throws ioexception
- 准备好 writer,处理一系列对
replacepixels 方法的调用。将根据所提供的数据来剪切受影响的像素区域。
如果 canreplacepixels 返回 false,则将抛出 unsupportedoperationexception。
如果输出为 null,则默认实现抛出 illegalstateexception,否则抛出 unsupportedoperationexception。
- 参数:
imageindex - 其像素将被替换的图像的索引。region - 将用来剪切将来的像素区域的 rectangle。
- 抛出:
illegalstateexception - 如果尚未设置输出。
unsupportedoperationexception - 如果 canreplacepixels(imageindex) 返回 false。
indexoutofboundsexception - 如果 imageindex 小于 0 或大于最大可用索引。
illegalstateexception - 如果以前调用了 preparereplacepixels 但没有相应地调用 endreplacepixels(也就是说 不允许进行嵌套)。
illegalargumentexception - 如果 region 为 null 或者宽度或高度小于 1。
ioexception - 如果在准备期间发生 i/o 错误。