本文整理汇总了Java中psd.parser.ColorMode.values方法的典型用法代码示例。如果您正苦于以下问题:Java ColorMode.values方法的具体用法?Java ColorMode.values怎么用?Java ColorMode.values使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类psd.parser.ColorMode
的用法示例。
在下文中一共展示了ColorMode.values方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
}