FileDocCategorySizeDatePackage
NativeCMM.javaAPI DocAndroid 1.5 API3241Wed May 06 22:41:54 BST 2009org.apache.harmony.awt.gl.color

NativeCMM

public class NativeCMM extends Object
This class is a wrapper for the native CMM library

Fields Summary
private static HashMap
profileHandles
Storage for profile handles, since they are private in ICC_Profile, but we need access to them.
private static boolean
isCMMLoaded
Constructors Summary
Methods Summary
public static voidaddHandle(java.awt.color.ICC_Profile key, long handle)


           
        profileHandles.put(key, new Long(handle));
    
public static native voidcmmCloseProfile(long profileID)

public static native longcmmCreateMultiprofileTransform(long[] profileHandles, int[] renderingIntents)

public static native voidcmmDeleteTransform(long transformHandle)

public static native voidcmmGetProfile(long profileID, byte[] data)

public static native voidcmmGetProfileElement(long profileID, int signature, byte[] data)

public static native intcmmGetProfileElementSize(long profileID, int signature)

public static native intcmmGetProfileSize(long profileID)

public static native longcmmOpenProfile(byte[] data)

public static native voidcmmSetProfileElement(long profileID, int tagSignature, byte[] data)

public static native voidcmmTranslateColors(long transformHandle, NativeImageFormat src, NativeImageFormat dest)

public static longgetHandle(java.awt.color.ICC_Profile key)

        return profileHandles.get(key).longValue();
    
static voidloadCMM()

        if (!isCMMLoaded) {
            AccessController.doPrivileged(
                  new PrivilegedAction<Void>() {
                    public Void run() {
                        System.loadLibrary("lcmm"); //$NON-NLS-1$
                        return null;
                    }
            } );
            isCMMLoaded = true;
        }
    
public static voidremoveHandle(java.awt.color.ICC_Profile key)

        profileHandles.remove(key);