类java.awt.color.CMMException源码实例Demo

下面列出了怎么用java.awt.color.CMMException的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: dragonwell8_jdk   文件: LCMS.java
static long createTransform(
    LCMSProfile[] profiles, int renderType,
    int inFormatter, boolean isInIntPacked,
    int outFormatter, boolean isOutIntPacked,
    Object disposerRef)
{
    long[] ptrs = new long[profiles.length];

    for (int i = 0; i < profiles.length; i++) {
        if (profiles[i] == null) throw new CMMException("Unknown profile ID");

        ptrs[i] = profiles[i].getLcmsPtr();
    }

    return createNativeTransform(ptrs, renderType, inFormatter,
            isInIntPacked, outFormatter, isOutIntPacked, disposerRef);
}
 
源代码2 项目: dragonwell8_jdk   文件: LCMSTransform.java
public short[] colorConvert(short[] src, short[] dst) {

        if (dst == null) {
            dst = new short [(src.length/getNumInComponents())*getNumOutComponents()];
        }

        try {
            LCMSImageLayout srcIL = new LCMSImageLayout(
                    src, src.length/getNumInComponents(),
                    LCMSImageLayout.CHANNELS_SH(getNumInComponents()) |
                    LCMSImageLayout.BYTES_SH(2), getNumInComponents()*2);

            LCMSImageLayout dstIL = new LCMSImageLayout(
                    dst, dst.length/getNumOutComponents(),
                    LCMSImageLayout.CHANNELS_SH(getNumOutComponents()) |
                    LCMSImageLayout.BYTES_SH(2), getNumOutComponents()*2);

            doTransform(srcIL, dstIL);

            return dst;
        } catch (ImageLayoutException e) {
            throw new CMMException("Unable to convert data");
        }
    }
 
源代码3 项目: dragonwell8_jdk   文件: LCMSTransform.java
public byte[] colorConvert(byte[] src, byte[] dst) {
    if (dst == null) {
        dst = new byte [(src.length/getNumInComponents())*getNumOutComponents()];
    }

    try {
        LCMSImageLayout srcIL = new LCMSImageLayout(
                src, src.length/getNumInComponents(),
                LCMSImageLayout.CHANNELS_SH(getNumInComponents()) |
                LCMSImageLayout.BYTES_SH(1), getNumInComponents());

        LCMSImageLayout dstIL = new LCMSImageLayout(
                dst, dst.length/getNumOutComponents(),
                LCMSImageLayout.CHANNELS_SH(getNumOutComponents()) |
                LCMSImageLayout.BYTES_SH(1), getNumOutComponents());

        doTransform(srcIL, dstIL);

        return dst;
    } catch (ImageLayoutException e) {
        throw new CMMException("Unable to convert data");
    }
}
 
源代码4 项目: dragonwell8_jdk   文件: InvalidRenderIntentTest.java
public static void main(String[] args) {
    ICC_Profile pSRGB = ICC_Profile.getInstance(CS_sRGB);

    byte[] raw_data = pSRGB.getData();

    setRenderingIntent(0x1000000, raw_data);

    ICC_Profile p = ICC_Profile.getInstance(raw_data);

    ICC_ColorSpace cs = new ICC_ColorSpace(p);

    // perfrom test color conversion
    ColorConvertOp op = new ColorConvertOp(cs,
            ColorSpace.getInstance(CS_sRGB), null);
    BufferedImage src = new BufferedImage(1, 1, TYPE_3BYTE_BGR);
    BufferedImage dst = new BufferedImage(1, 1, TYPE_3BYTE_BGR);

    try {
        op.filter(src.getRaster(), dst.getRaster());
    } catch (CMMException e) {
        throw new RuntimeException("Test failed.", e);
    }
    System.out.println("Test passed.");
}
 
源代码5 项目: TencentKona-8   文件: LCMS.java
static long createTransform(
    LCMSProfile[] profiles, int renderType,
    int inFormatter, boolean isInIntPacked,
    int outFormatter, boolean isOutIntPacked,
    Object disposerRef)
{
    long[] ptrs = new long[profiles.length];

    for (int i = 0; i < profiles.length; i++) {
        if (profiles[i] == null) throw new CMMException("Unknown profile ID");

        ptrs[i] = profiles[i].getLcmsPtr();
    }

    return createNativeTransform(ptrs, renderType, inFormatter,
            isInIntPacked, outFormatter, isOutIntPacked, disposerRef);
}
 
源代码6 项目: TencentKona-8   文件: LCMSTransform.java
public short[] colorConvert(short[] src, short[] dst) {

        if (dst == null) {
            dst = new short [(src.length/getNumInComponents())*getNumOutComponents()];
        }

        try {
            LCMSImageLayout srcIL = new LCMSImageLayout(
                    src, src.length/getNumInComponents(),
                    LCMSImageLayout.CHANNELS_SH(getNumInComponents()) |
                    LCMSImageLayout.BYTES_SH(2), getNumInComponents()*2);

            LCMSImageLayout dstIL = new LCMSImageLayout(
                    dst, dst.length/getNumOutComponents(),
                    LCMSImageLayout.CHANNELS_SH(getNumOutComponents()) |
                    LCMSImageLayout.BYTES_SH(2), getNumOutComponents()*2);

            doTransform(srcIL, dstIL);

            return dst;
        } catch (ImageLayoutException e) {
            throw new CMMException("Unable to convert data");
        }
    }
 
源代码7 项目: TencentKona-8   文件: LCMSTransform.java
public byte[] colorConvert(byte[] src, byte[] dst) {
    if (dst == null) {
        dst = new byte [(src.length/getNumInComponents())*getNumOutComponents()];
    }

    try {
        LCMSImageLayout srcIL = new LCMSImageLayout(
                src, src.length/getNumInComponents(),
                LCMSImageLayout.CHANNELS_SH(getNumInComponents()) |
                LCMSImageLayout.BYTES_SH(1), getNumInComponents());

        LCMSImageLayout dstIL = new LCMSImageLayout(
                dst, dst.length/getNumOutComponents(),
                LCMSImageLayout.CHANNELS_SH(getNumOutComponents()) |
                LCMSImageLayout.BYTES_SH(1), getNumOutComponents());

        doTransform(srcIL, dstIL);

        return dst;
    } catch (ImageLayoutException e) {
        throw new CMMException("Unable to convert data");
    }
}
 
源代码8 项目: TencentKona-8   文件: InvalidRenderIntentTest.java
public static void main(String[] args) {
    ICC_Profile pSRGB = ICC_Profile.getInstance(CS_sRGB);

    byte[] raw_data = pSRGB.getData();

    setRenderingIntent(0x1000000, raw_data);

    ICC_Profile p = ICC_Profile.getInstance(raw_data);

    ICC_ColorSpace cs = new ICC_ColorSpace(p);

    // perfrom test color conversion
    ColorConvertOp op = new ColorConvertOp(cs,
            ColorSpace.getInstance(CS_sRGB), null);
    BufferedImage src = new BufferedImage(1, 1, TYPE_3BYTE_BGR);
    BufferedImage dst = new BufferedImage(1, 1, TYPE_3BYTE_BGR);

    try {
        op.filter(src.getRaster(), dst.getRaster());
    } catch (CMMException e) {
        throw new RuntimeException("Test failed.", e);
    }
    System.out.println("Test passed.");
}
 
源代码9 项目: jdk8u60   文件: LCMS.java
static long createTransform(
    LCMSProfile[] profiles, int renderType,
    int inFormatter, boolean isInIntPacked,
    int outFormatter, boolean isOutIntPacked,
    Object disposerRef)
{
    long[] ptrs = new long[profiles.length];

    for (int i = 0; i < profiles.length; i++) {
        if (profiles[i] == null) throw new CMMException("Unknown profile ID");

        ptrs[i] = profiles[i].getLcmsPtr();
    }

    return createNativeTransform(ptrs, renderType, inFormatter,
            isInIntPacked, outFormatter, isOutIntPacked, disposerRef);
}
 
源代码10 项目: jdk8u60   文件: LCMSTransform.java
public short[] colorConvert(short[] src, short[] dst) {

        if (dst == null) {
            dst = new short [(src.length/getNumInComponents())*getNumOutComponents()];
        }

        try {
            LCMSImageLayout srcIL = new LCMSImageLayout(
                    src, src.length/getNumInComponents(),
                    LCMSImageLayout.CHANNELS_SH(getNumInComponents()) |
                    LCMSImageLayout.BYTES_SH(2), getNumInComponents()*2);

            LCMSImageLayout dstIL = new LCMSImageLayout(
                    dst, dst.length/getNumOutComponents(),
                    LCMSImageLayout.CHANNELS_SH(getNumOutComponents()) |
                    LCMSImageLayout.BYTES_SH(2), getNumOutComponents()*2);

            doTransform(srcIL, dstIL);

            return dst;
        } catch (ImageLayoutException e) {
            throw new CMMException("Unable to convert data");
        }
    }
 
源代码11 项目: jdk8u60   文件: LCMSTransform.java
public byte[] colorConvert(byte[] src, byte[] dst) {
    if (dst == null) {
        dst = new byte [(src.length/getNumInComponents())*getNumOutComponents()];
    }

    try {
        LCMSImageLayout srcIL = new LCMSImageLayout(
                src, src.length/getNumInComponents(),
                LCMSImageLayout.CHANNELS_SH(getNumInComponents()) |
                LCMSImageLayout.BYTES_SH(1), getNumInComponents());

        LCMSImageLayout dstIL = new LCMSImageLayout(
                dst, dst.length/getNumOutComponents(),
                LCMSImageLayout.CHANNELS_SH(getNumOutComponents()) |
                LCMSImageLayout.BYTES_SH(1), getNumOutComponents());

        doTransform(srcIL, dstIL);

        return dst;
    } catch (ImageLayoutException e) {
        throw new CMMException("Unable to convert data");
    }
}
 
源代码12 项目: jdk8u60   文件: InvalidRenderIntentTest.java
public static void main(String[] args) {
    ICC_Profile pSRGB = ICC_Profile.getInstance(CS_sRGB);

    byte[] raw_data = pSRGB.getData();

    setRenderingIntent(0x1000000, raw_data);

    ICC_Profile p = ICC_Profile.getInstance(raw_data);

    ICC_ColorSpace cs = new ICC_ColorSpace(p);

    // perfrom test color conversion
    ColorConvertOp op = new ColorConvertOp(cs,
            ColorSpace.getInstance(CS_sRGB), null);
    BufferedImage src = new BufferedImage(1, 1, TYPE_3BYTE_BGR);
    BufferedImage dst = new BufferedImage(1, 1, TYPE_3BYTE_BGR);

    try {
        op.filter(src.getRaster(), dst.getRaster());
    } catch (CMMException e) {
        throw new RuntimeException("Test failed.", e);
    }
    System.out.println("Test passed.");
}
 
源代码13 项目: openjdk-jdk8u   文件: LCMS.java
static long createTransform(
    LCMSProfile[] profiles, int renderType,
    int inFormatter, boolean isInIntPacked,
    int outFormatter, boolean isOutIntPacked,
    Object disposerRef)
{
    long[] ptrs = new long[profiles.length];

    for (int i = 0; i < profiles.length; i++) {
        if (profiles[i] == null) throw new CMMException("Unknown profile ID");

        ptrs[i] = profiles[i].getLcmsPtr();
    }

    return createNativeTransform(ptrs, renderType, inFormatter,
            isInIntPacked, outFormatter, isOutIntPacked, disposerRef);
}
 
源代码14 项目: openjdk-jdk8u   文件: LCMSTransform.java
public short[] colorConvert(short[] src, short[] dst) {

        if (dst == null) {
            dst = new short [(src.length/getNumInComponents())*getNumOutComponents()];
        }

        try {
            LCMSImageLayout srcIL = new LCMSImageLayout(
                    src, src.length/getNumInComponents(),
                    LCMSImageLayout.CHANNELS_SH(getNumInComponents()) |
                    LCMSImageLayout.BYTES_SH(2), getNumInComponents()*2);

            LCMSImageLayout dstIL = new LCMSImageLayout(
                    dst, dst.length/getNumOutComponents(),
                    LCMSImageLayout.CHANNELS_SH(getNumOutComponents()) |
                    LCMSImageLayout.BYTES_SH(2), getNumOutComponents()*2);

            doTransform(srcIL, dstIL);

            return dst;
        } catch (ImageLayoutException e) {
            throw new CMMException("Unable to convert data");
        }
    }
 
源代码15 项目: openjdk-jdk8u   文件: LCMSTransform.java
public byte[] colorConvert(byte[] src, byte[] dst) {
    if (dst == null) {
        dst = new byte [(src.length/getNumInComponents())*getNumOutComponents()];
    }

    try {
        LCMSImageLayout srcIL = new LCMSImageLayout(
                src, src.length/getNumInComponents(),
                LCMSImageLayout.CHANNELS_SH(getNumInComponents()) |
                LCMSImageLayout.BYTES_SH(1), getNumInComponents());

        LCMSImageLayout dstIL = new LCMSImageLayout(
                dst, dst.length/getNumOutComponents(),
                LCMSImageLayout.CHANNELS_SH(getNumOutComponents()) |
                LCMSImageLayout.BYTES_SH(1), getNumOutComponents());

        doTransform(srcIL, dstIL);

        return dst;
    } catch (ImageLayoutException e) {
        throw new CMMException("Unable to convert data");
    }
}
 
源代码16 项目: openjdk-jdk8u   文件: InvalidRenderIntentTest.java
public static void main(String[] args) {
    ICC_Profile pSRGB = ICC_Profile.getInstance(CS_sRGB);

    byte[] raw_data = pSRGB.getData();

    setRenderingIntent(0x1000000, raw_data);

    ICC_Profile p = ICC_Profile.getInstance(raw_data);

    ICC_ColorSpace cs = new ICC_ColorSpace(p);

    // perfrom test color conversion
    ColorConvertOp op = new ColorConvertOp(cs,
            ColorSpace.getInstance(CS_sRGB), null);
    BufferedImage src = new BufferedImage(1, 1, TYPE_3BYTE_BGR);
    BufferedImage dst = new BufferedImage(1, 1, TYPE_3BYTE_BGR);

    try {
        op.filter(src.getRaster(), dst.getRaster());
    } catch (CMMException e) {
        throw new RuntimeException("Test failed.", e);
    }
    System.out.println("Test passed.");
}
 
源代码17 项目: openjdk-jdk8u-backup   文件: LCMS.java
static long createTransform(
    LCMSProfile[] profiles, int renderType,
    int inFormatter, boolean isInIntPacked,
    int outFormatter, boolean isOutIntPacked,
    Object disposerRef)
{
    long[] ptrs = new long[profiles.length];

    for (int i = 0; i < profiles.length; i++) {
        if (profiles[i] == null) throw new CMMException("Unknown profile ID");

        ptrs[i] = profiles[i].getLcmsPtr();
    }

    return createNativeTransform(ptrs, renderType, inFormatter,
            isInIntPacked, outFormatter, isOutIntPacked, disposerRef);
}
 
源代码18 项目: openjdk-jdk8u-backup   文件: LCMSTransform.java
public short[] colorConvert(short[] src, short[] dst) {

        if (dst == null) {
            dst = new short [(src.length/getNumInComponents())*getNumOutComponents()];
        }

        try {
            LCMSImageLayout srcIL = new LCMSImageLayout(
                    src, src.length/getNumInComponents(),
                    LCMSImageLayout.CHANNELS_SH(getNumInComponents()) |
                    LCMSImageLayout.BYTES_SH(2), getNumInComponents()*2);

            LCMSImageLayout dstIL = new LCMSImageLayout(
                    dst, dst.length/getNumOutComponents(),
                    LCMSImageLayout.CHANNELS_SH(getNumOutComponents()) |
                    LCMSImageLayout.BYTES_SH(2), getNumOutComponents()*2);

            doTransform(srcIL, dstIL);

            return dst;
        } catch (ImageLayoutException e) {
            throw new CMMException("Unable to convert data");
        }
    }
 
源代码19 项目: openjdk-jdk8u-backup   文件: LCMSTransform.java
public byte[] colorConvert(byte[] src, byte[] dst) {
    if (dst == null) {
        dst = new byte [(src.length/getNumInComponents())*getNumOutComponents()];
    }

    try {
        LCMSImageLayout srcIL = new LCMSImageLayout(
                src, src.length/getNumInComponents(),
                LCMSImageLayout.CHANNELS_SH(getNumInComponents()) |
                LCMSImageLayout.BYTES_SH(1), getNumInComponents());

        LCMSImageLayout dstIL = new LCMSImageLayout(
                dst, dst.length/getNumOutComponents(),
                LCMSImageLayout.CHANNELS_SH(getNumOutComponents()) |
                LCMSImageLayout.BYTES_SH(1), getNumOutComponents());

        doTransform(srcIL, dstIL);

        return dst;
    } catch (ImageLayoutException e) {
        throw new CMMException("Unable to convert data");
    }
}
 
public static void main(String[] args) {
    ICC_Profile pSRGB = ICC_Profile.getInstance(CS_sRGB);

    byte[] raw_data = pSRGB.getData();

    setRenderingIntent(0x1000000, raw_data);

    ICC_Profile p = ICC_Profile.getInstance(raw_data);

    ICC_ColorSpace cs = new ICC_ColorSpace(p);

    // perfrom test color conversion
    ColorConvertOp op = new ColorConvertOp(cs,
            ColorSpace.getInstance(CS_sRGB), null);
    BufferedImage src = new BufferedImage(1, 1, TYPE_3BYTE_BGR);
    BufferedImage dst = new BufferedImage(1, 1, TYPE_3BYTE_BGR);

    try {
        op.filter(src.getRaster(), dst.getRaster());
    } catch (CMMException e) {
        throw new RuntimeException("Test failed.", e);
    }
    System.out.println("Test passed.");
}
 
源代码21 项目: jdk8u-dev-jdk   文件: LCMSTransform.java
public short[] colorConvert(short[] src, short[] dst) {

        if (dst == null) {
            dst = new short [(src.length/getNumInComponents())*getNumOutComponents()];
        }

        try {
            LCMSImageLayout srcIL = new LCMSImageLayout(
                    src, src.length/getNumInComponents(),
                    LCMSImageLayout.CHANNELS_SH(getNumInComponents()) |
                    LCMSImageLayout.BYTES_SH(2), getNumInComponents()*2);

            LCMSImageLayout dstIL = new LCMSImageLayout(
                    dst, dst.length/getNumOutComponents(),
                    LCMSImageLayout.CHANNELS_SH(getNumOutComponents()) |
                    LCMSImageLayout.BYTES_SH(2), getNumOutComponents()*2);

            doTransform(srcIL, dstIL);

            return dst;
        } catch (ImageLayoutException e) {
            throw new CMMException("Unable to convert data");
        }
    }
 
源代码22 项目: Bytecoder   文件: LCMSTransform.java
public short[] colorConvert(short[] src, short[] dst) {

        if (dst == null) {
            dst = new short [(src.length/getNumInComponents())*getNumOutComponents()];
        }

        try {
            LCMSImageLayout srcIL = new LCMSImageLayout(
                    src, src.length/getNumInComponents(),
                    LCMSImageLayout.CHANNELS_SH(getNumInComponents()) |
                    LCMSImageLayout.BYTES_SH(2), getNumInComponents()*2);

            LCMSImageLayout dstIL = new LCMSImageLayout(
                    dst, dst.length/getNumOutComponents(),
                    LCMSImageLayout.CHANNELS_SH(getNumOutComponents()) |
                    LCMSImageLayout.BYTES_SH(2), getNumOutComponents()*2);

            doTransform(srcIL, dstIL);

            return dst;
        } catch (ImageLayoutException e) {
            throw new CMMException("Unable to convert data");
        }
    }
 
源代码23 项目: Bytecoder   文件: LCMSTransform.java
public byte[] colorConvert(byte[] src, byte[] dst) {
    if (dst == null) {
        dst = new byte [(src.length/getNumInComponents())*getNumOutComponents()];
    }

    try {
        LCMSImageLayout srcIL = new LCMSImageLayout(
                src, src.length/getNumInComponents(),
                LCMSImageLayout.CHANNELS_SH(getNumInComponents()) |
                LCMSImageLayout.BYTES_SH(1), getNumInComponents());

        LCMSImageLayout dstIL = new LCMSImageLayout(
                dst, dst.length/getNumOutComponents(),
                LCMSImageLayout.CHANNELS_SH(getNumOutComponents()) |
                LCMSImageLayout.BYTES_SH(1), getNumOutComponents());

        doTransform(srcIL, dstIL);

        return dst;
    } catch (ImageLayoutException e) {
        throw new CMMException("Unable to convert data");
    }
}
 
源代码24 项目: openjdk-jdk9   文件: LCMS.java
static long createTransform(
    LCMSProfile[] profiles, int renderType,
    int inFormatter, boolean isInIntPacked,
    int outFormatter, boolean isOutIntPacked,
    Object disposerRef)
{
    long[] ptrs = new long[profiles.length];

    for (int i = 0; i < profiles.length; i++) {
        if (profiles[i] == null) throw new CMMException("Unknown profile ID");

        ptrs[i] = profiles[i].getLcmsPtr();
    }

    return createNativeTransform(ptrs, renderType, inFormatter,
            isInIntPacked, outFormatter, isOutIntPacked, disposerRef);
}
 
源代码25 项目: openjdk-jdk9   文件: LCMSTransform.java
public short[] colorConvert(short[] src, short[] dst) {

        if (dst == null) {
            dst = new short [(src.length/getNumInComponents())*getNumOutComponents()];
        }

        try {
            LCMSImageLayout srcIL = new LCMSImageLayout(
                    src, src.length/getNumInComponents(),
                    LCMSImageLayout.CHANNELS_SH(getNumInComponents()) |
                    LCMSImageLayout.BYTES_SH(2), getNumInComponents()*2);

            LCMSImageLayout dstIL = new LCMSImageLayout(
                    dst, dst.length/getNumOutComponents(),
                    LCMSImageLayout.CHANNELS_SH(getNumOutComponents()) |
                    LCMSImageLayout.BYTES_SH(2), getNumOutComponents()*2);

            doTransform(srcIL, dstIL);

            return dst;
        } catch (ImageLayoutException e) {
            throw new CMMException("Unable to convert data");
        }
    }
 
源代码26 项目: openjdk-jdk9   文件: LCMSTransform.java
public byte[] colorConvert(byte[] src, byte[] dst) {
    if (dst == null) {
        dst = new byte [(src.length/getNumInComponents())*getNumOutComponents()];
    }

    try {
        LCMSImageLayout srcIL = new LCMSImageLayout(
                src, src.length/getNumInComponents(),
                LCMSImageLayout.CHANNELS_SH(getNumInComponents()) |
                LCMSImageLayout.BYTES_SH(1), getNumInComponents());

        LCMSImageLayout dstIL = new LCMSImageLayout(
                dst, dst.length/getNumOutComponents(),
                LCMSImageLayout.CHANNELS_SH(getNumOutComponents()) |
                LCMSImageLayout.BYTES_SH(1), getNumOutComponents());

        doTransform(srcIL, dstIL);

        return dst;
    } catch (ImageLayoutException e) {
        throw new CMMException("Unable to convert data");
    }
}
 
源代码27 项目: openjdk-jdk9   文件: InvalidRenderIntentTest.java
public static void main(String[] args) {
    ICC_Profile pSRGB = ICC_Profile.getInstance(CS_sRGB);

    byte[] raw_data = pSRGB.getData();

    setRenderingIntent(0x1000000, raw_data);

    ICC_Profile p = ICC_Profile.getInstance(raw_data);

    ICC_ColorSpace cs = new ICC_ColorSpace(p);

    // perfrom test color conversion
    ColorConvertOp op = new ColorConvertOp(cs,
            ColorSpace.getInstance(CS_sRGB), null);
    BufferedImage src = new BufferedImage(1, 1, TYPE_3BYTE_BGR);
    BufferedImage dst = new BufferedImage(1, 1, TYPE_3BYTE_BGR);

    try {
        op.filter(src.getRaster(), dst.getRaster());
    } catch (CMMException e) {
        throw new RuntimeException("Test failed.", e);
    }
    System.out.println("Test passed.");
}
 
源代码28 项目: jdk8u-dev-jdk   文件: LCMS.java
static long createTransform(
    LCMSProfile[] profiles, int renderType,
    int inFormatter, boolean isInIntPacked,
    int outFormatter, boolean isOutIntPacked,
    Object disposerRef)
{
    long[] ptrs = new long[profiles.length];

    for (int i = 0; i < profiles.length; i++) {
        if (profiles[i] == null) throw new CMMException("Unknown profile ID");

        ptrs[i] = profiles[i].getLcmsPtr();
    }

    return createNativeTransform(ptrs, renderType, inFormatter,
            isInIntPacked, outFormatter, isOutIntPacked, disposerRef);
}
 
源代码29 项目: jdk8u-jdk   文件: LCMS.java
static long createTransform(
    LCMSProfile[] profiles, int renderType,
    int inFormatter, boolean isInIntPacked,
    int outFormatter, boolean isOutIntPacked,
    Object disposerRef)
{
    long[] ptrs = new long[profiles.length];

    for (int i = 0; i < profiles.length; i++) {
        if (profiles[i] == null) throw new CMMException("Unknown profile ID");

        ptrs[i] = profiles[i].getLcmsPtr();
    }

    return createNativeTransform(ptrs, renderType, inFormatter,
            isInIntPacked, outFormatter, isOutIntPacked, disposerRef);
}
 
源代码30 项目: jdk8u-jdk   文件: LCMSTransform.java
public short[] colorConvert(short[] src, short[] dst) {

        if (dst == null) {
            dst = new short [(src.length/getNumInComponents())*getNumOutComponents()];
        }

        try {
            LCMSImageLayout srcIL = new LCMSImageLayout(
                    src, src.length/getNumInComponents(),
                    LCMSImageLayout.CHANNELS_SH(getNumInComponents()) |
                    LCMSImageLayout.BYTES_SH(2), getNumInComponents()*2);

            LCMSImageLayout dstIL = new LCMSImageLayout(
                    dst, dst.length/getNumOutComponents(),
                    LCMSImageLayout.CHANNELS_SH(getNumOutComponents()) |
                    LCMSImageLayout.BYTES_SH(2), getNumOutComponents()*2);

            doTransform(srcIL, dstIL);

            return dst;
        } catch (ImageLayoutException e) {
            throw new CMMException("Unable to convert data");
        }
    }
 
 类所在包
 同包方法