⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xyznumber.java

📁 jpeg2000编解码
💻 JAVA
字号:
/***************************************************************************** * * $Id: XYZNumber.java,v 1.1.1.1 2002/08/02 09:47:05 grosbois Exp $ * * Copyright Eastman Kodak Company, 343 State Street, Rochester, NY 14650 * $Date $ *****************************************************************************/package icc.types;import java.io.IOException;import java.io.RandomAccessFile;import icc .ICCProfile;/** * A convientient representation for the contents of the * ICCXYZTypeTag class. *  * @see		jj2000.j2k.icc.tags.ICCXYZType * @version	1.0 * @author	Bruce A. Kern */public class XYZNumber{    public final static int size = 3 * ICCProfile.int_size;	/** x value */public int dwX;	// X tristimulus value	/** y value */public int dwY;	// Y tristimulus value	/** z value */public int dwZ;	// Z tristimulus value    /** Construct from constituent parts. */    public XYZNumber (int x, int y, int z) {        dwX = x; dwY = y; dwZ = z; }    /** Normalization utility */    public static int DoubleToXYZ ( double x ) {        return (int) Math.floor(x * 65536.0 + 0.5); }    /** Normalization utility */    public static double XYZToDouble (int x) {         return (double)x / 65536.0; }    /** Write to a file */    public void write (RandomAccessFile raf) throws IOException {        raf.writeInt (dwX);        raf.writeInt (dwY);        raf.writeInt (dwZ); }    /** String representation of class instance. */    public String toString () {        return "[" + dwX + ", " + dwY + ", " + dwZ + "]"; }        /* end class XYZNumber */ }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -