本文整理汇总了Java中psd.parser.ColorMode类的典型用法代码示例。如果您正苦于以下问题:Java ColorMode类的具体用法?Java ColorMode怎么用?Java ColorMode使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ColorMode类属于psd.parser包,在下文中一共展示了ColorMode类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: parse
import psd.parser.ColorMode; //导入依赖的package包/类
public void parse(PsdInputStream psdStream) throws IOException {
String fileSignature = psdStream.readString(4);
if (!fileSignature.equals(FILE_SIGNATURE)) {
throw new IOException("file signature error");
}
int ver = psdStream.readShort();
if (ver != FILE_VERSION) {
throw new IOException("file version error ");
}
psdStream.skipBytes(6); // reserved
header.channelsCount = psdStream.readShort();
header.height = psdStream.readInt();
header.width = psdStream.readInt();
header.depth = psdStream.readShort();
int colorModeIndex = psdStream.readShort();
header.colorMode = ColorMode.values()[colorModeIndex];
if (handler != null) {
handler.headerLoaded(header);
}
}
示例2: parse
import psd.parser.ColorMode; //导入依赖的package包/类
public void parse(PsdInputStream psdStream) throws IOException {
String fileSignature = psdStream.readString(4);
if (!fileSignature.equals(FILE_SIGNATURE)) {
throw new IOException("file signature error");
}
int ver = psdStream.readShort();
if (ver != FILE_VERSION) {
throw new IOException("file version error ");
}
psdStream.skipBytes(6); // reserved
header.channelsCount = psdStream.readShort();
header.height = psdStream.readInt();
header.width = psdStream.readInt();
header.depth = psdStream.readShort();
int colorModeIndex = psdStream.readShort();
header.colorMode = ColorMode.values()[colorModeIndex];
if (handler != null) {
handler.headerLoaded(header);
}
}
示例3: getColorMode
import psd.parser.ColorMode; //导入依赖的package包/类
public ColorMode getColorMode() {
return colorMode;
}