本文整理汇总了Java中org.monte.media.avi.AVIBMPDIB类的典型用法代码示例。如果您正苦于以下问题:Java AVIBMPDIB类的具体用法?Java AVIBMPDIB怎么用?Java AVIBMPDIB使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
AVIBMPDIB类属于org.monte.media.avi包,在下文中一共展示了AVIBMPDIB类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: readHeader
import org.monte.media.avi.AVIBMPDIB; //导入依赖的package包/类
/** Reads the image header.
* Does nothing if the header has already been loaded.
*/
private void readHeader() throws IOException {
if (image == null) {
ImageReader r = new JPEGImageReader(getOriginatingProvider());
Object in = getInput();
if (in instanceof Buffer) {
Buffer buffer = (Buffer) in;
in=buffer.getData();
}
if (in instanceof byte[]) {
r.setInput(new MemoryCacheImageInputStream(AVIBMPDIB.prependDHTSeg((byte[]) in)));
} else if (in instanceof ImageInputStream) {
r.setInput(AVIBMPDIB.prependDHTSeg((ImageInputStream) in));
} else {
r.setInput(AVIBMPDIB.prependDHTSeg((InputStream) in));
}
image = r.read(0);
}
}
示例2: readHeader
import org.monte.media.avi.AVIBMPDIB; //导入依赖的package包/类
/** Reads the image header.
* Does nothing if the header has already been loaded.
*/
private void readHeader() throws IOException {
if (image == null) {
ImageReader r = new JPEGImageReader(getOriginatingProvider());
Object in = getInput();
/*if (in instanceof Buffer) {
Buffer buffer = (Buffer) in;
in=buffer.getData();
}*/
if (in instanceof byte[]) {
r.setInput(new MemoryCacheImageInputStream(AVIBMPDIB.prependDHTSeg((byte[]) in)));
} else if (in instanceof ImageInputStream) {
r.setInput(AVIBMPDIB.prependDHTSeg((ImageInputStream) in));
} else {
r.setInput(AVIBMPDIB.prependDHTSeg((InputStream) in));
}
image = r.read(0);
}
}