|
JavaTM 2 Platform Standard Ed. 6 |
|||||||||
| 上一個類別 下一個類別 | 框架 無框架 | |||||||||
| 摘要: 巢狀 | 欄位 | 建構子 | 方法 | 詳細資訊: 欄位 | 建構子 | 方法 | |||||||||
public interface IIOReadUpdateListener
供 ImageReader 實作用於通知其圖像和縮略圖的調用者相關像素更新的介面。
ImageReader.addIIOReadUpdateListener(javax.imageio.event.IIOReadUpdateListener),
ImageReader.removeIIOReadUpdateListener(javax.imageio.event.IIOReadUpdateListener)| 方法摘要 | |
|---|---|
void |
imageUpdate(ImageReader source,
BufferedImage theImage,
int minX,
int minY,
int width,
int height,
int periodX,
int periodY,
int[] bands)
報告已更新圖像的給定區域。 |
void |
passComplete(ImageReader source,
BufferedImage theImage)
報告當前讀操作已經完成一個逐步傳遞。 |
void |
passStarted(ImageReader source,
BufferedImage theImage,
int pass,
int minPass,
int maxPass,
int minX,
int minY,
int periodX,
int periodY,
int[] bands)
報告當前的讀操作將開始逐步傳遞 (progressive pass)。 |
void |
thumbnailPassComplete(ImageReader source,
BufferedImage theThumbnail)
報告當前縮略圖讀操作已經完成一個逐步傳遞。 |
void |
thumbnailPassStarted(ImageReader source,
BufferedImage theThumbnail,
int pass,
int minPass,
int maxPass,
int minX,
int minY,
int periodX,
int periodY,
int[] bands)
報告當前的縮略圖讀操作將開始逐步傳遞。 |
void |
thumbnailUpdate(ImageReader source,
BufferedImage theThumbnail,
int minX,
int minY,
int width,
int height,
int periodX,
int periodY,
int[] bands)
報告已更新縮略圖圖像的給定區域。 |
| 方法詳細資訊 |
|---|
void passStarted(ImageReader source,
BufferedImage theImage,
int pass,
int minPass,
int maxPass,
int minX,
int minY,
int periodX,
int periodY,
int[] bands)
minX、minY、width 和 height 參數指示對將通過傳遞更新的區域的估計。如果傳遞交錯進行,即僅更新所選行或列,則 periodX 和 periodY 參數將指示二次抽樣的進行程度。bands 的值指示可能受影響的 band 集合。
source - 調用此方法的 ImageReader 物件。theImage - 將被更新的 BufferedImage。pass - 將要開始的傳遞的編號(從 0 開始)。minPass - 將要解碼的第一個傳遞的索引。maxPass - 將要解碼的最後一個傳遞的索引。minX - 最左邊的更新像素列的 X 坐標。minY - 最上邊的更新像素行的 Y 坐標。periodX - 更新像素之間的水平間隔;值 1 表示沒有間距。periodY - 更新像素之間的垂直間隔;值 1 表示沒有間距。bands - 指示可能更新的 band 集合的 int 陣列。
void imageUpdate(ImageReader source,
BufferedImage theImage,
int minX,
int minY,
int width,
int height,
int periodX,
int periodY,
int[] bands)
注意,不同的圖像格式 reader 可能產生以多種不同順序排列的解碼像素。多數 reader 將產生以簡單的從上到下、從左到右順序排列的像素,而另一此則可能使用交錯、平鋪等多種傳遞。例如,調用時更新順序甚至會由於網路速度的不同而相同。調用此方法並不能保證所有指定的像素都已經實際被更新,只保證在指定像素的某個子區域發生了更新。
特定的 ImageReader 實作可以選擇提供更新的頻率。每次更新都指定自上次更新以來已經更新了圖像的給定區域。區域由其空間邊界框(minX、minY、width 和 height)、X 和 Y 子二次抽樣因子(periodX 和 periodY)以及更新的 band 集合(bands)來描述。例如,更新:
minX = 10
minY = 20
width = 3
height = 4
periodX = 2
periodY = 3
bands = { 1, 3 }
指示以下像素的 band 1 和 band 3 已更新:
(10, 20) (12, 20) (14, 20) (10, 23) (12, 23) (14, 23) (10, 26) (12, 26) (14, 26) (10, 29) (12, 29) (14, 29)
source - 調用此方法的 ImageReader 物件。theImage - 將被更新的 BufferedImage。minX - 最左邊的更新像素列的 X 坐標。minY - 最上邊的更新像素行的 Y 坐標。width - 水平更新的像素數。height - 垂直更新的像素數。periodX - 更新像素之間的水平間隔;值 1 表示沒有間距。periodY - 更新像素之間的垂直間隔;值 1 表示沒有間距。bands - 指示要更新的 band 的 int 陣列。
void passComplete(ImageReader source,
BufferedImage theImage)
source - 調用此方法的 ImageReader 物件。theImage - 將被更新的 BufferedImage。ImageReadParam.setSourceProgressivePasses(int, int)
void thumbnailPassStarted(ImageReader source,
BufferedImage theThumbnail,
int pass,
int minPass,
int maxPass,
int minX,
int minY,
int periodX,
int periodY,
int[] bands)
source - 調用此方法的 ImageReader 物件。theThumbnail - 將被更新的 BufferedImage 縮略圖。pass - 將要開始的傳遞的編號(從 0 開始)。minPass - 將要解碼的第一個傳遞的索引。maxPass - 將要解碼的最後一個傳遞的索引。minX - 最左邊的更新像素列的 X 坐標。minY - 最上邊的更新像素行的 Y 坐標。periodX - 更新像素之間的水平間隔;值 1 表示沒有間距。periodY - 更新像素之間的垂直間隔;值 1 表示沒有間距。bands - 指示可能更新的 band 集合的 int 陣列。passStarted(javax.imageio.ImageReader, java.awt.image.BufferedImage, int, int, int, int, int, int, int, int[])
void thumbnailUpdate(ImageReader source,
BufferedImage theThumbnail,
int minX,
int minY,
int width,
int height,
int periodX,
int periodY,
int[] bands)
source - 調用此方法的 ImageReader 物件。theThumbnail - 將被更新的 BufferedImage 縮略圖。minX - 最左邊的更新像素列的 X 坐標。minY - 最上邊的更新像素行的 Y 坐標。width - 水平更新的像素數。height - 垂直更新的像素數。periodX - 更新像素之間的水平間隔;值 1 表示沒有間距。periodY - 更新像素之間的垂直間隔;值 1 表示沒有間距。bands - 指示要更新的 band 的 int 陣列。imageUpdate(javax.imageio.ImageReader, java.awt.image.BufferedImage, int, int, int, int, int, int, int[])
void thumbnailPassComplete(ImageReader source,
BufferedImage theThumbnail)
source - 調用此方法的 ImageReader 物件。theThumbnail - 將被更新的 BufferedImage 縮略圖。passComplete(javax.imageio.ImageReader, java.awt.image.BufferedImage)
|
JavaTM 2 Platform Standard Ed. 6 |
|||||||||
| 上一個類別 下一個類別 | 框架 無框架 | |||||||||
| 摘要: 巢狀 | 欄位 | 建構子 | 方法 | 詳細資訊: 欄位 | 建構子 | 方法 | |||||||||
版權所有 2008 Sun Microsystems, Inc. 保留所有權利。請遵守GNU General Public License, version 2 only。