java命名空间javax.imageio类imagereader的类成员方法:
getthumbnailheight定义及介绍
本文导语:
getthumbnailheight
public int getthumbnailheight(int imageindex,
int thumbnailindex)
throws ioexception
返回通过索引 thumbnailindex 指定的缩略图预览图像的高度,其与通过索引 imageindex 指定的图像关联。
如...
getthumbnailheight
public int getthumbnailheight(int imageindex,
int thumbnailindex)
throws ioexception
- 返回通过索引
thumbnailindex 指定的缩略图预览图像的高度,其与通过索引 imageindex 指定的图像关联。
如果 reader 不支持缩略图(readersupportsthumbnails 返回 false),则将抛出 unsupportedoperationexception。
默认实现返回 readthumbnail(imageindex, thumbnailindex).getheight()。所以,为了避免强行读取缩略图,子类应该重写此方法(如果有可能)。
- 参数:
imageindex - 将被获取的图像的索引。thumbnailindex - 将被获取的缩略图的索引。
- 返回:
int 形式的所需缩略图高度。
- 抛出:
unsupportedoperationexception - 如果不支持缩略图。
illegalstateexception - 如果尚未设置输入源。
indexoutofboundsexception - 如果任何一个所提供的索引超出范围。
ioexception - 如果在读取过程中发生错误。