1 /* Copyright (C) 2016 Masahiro Kitagawa */
2 
3 package com.lightcrafts.utils;
4 
5 public class LCMSNative {
6 
7 // Native LCMS API Functions
8 // NOTE: LCMS doesn't seem to be properly reentrant, make all native calls synchronized
9 
cmsCreateProofingTransform(long inputProfile, int inputFormat, long outputProfile, int outputFormat, long proofingProfile, int Intent, int ProofingIntent, int dwFlags)10     synchronized native static long cmsCreateProofingTransform(long inputProfile, int inputFormat,
11                                                                long outputProfile, int outputFormat,
12                                                                long proofingProfile,
13                                                                int Intent, int ProofingIntent, int dwFlags);
14 
cmsCreateLab2Profile()15     protected synchronized native static long cmsCreateLab2Profile();
16 
cmsOpenProfileFromMem(byte data[], int size)17     protected synchronized native static long cmsOpenProfileFromMem(byte data[], int size);
18 
cmsCreateRGBProfile(double WhitePoint[], double Primaries[], double gamma)19     protected synchronized native static long cmsCreateRGBProfile(double WhitePoint[],
20                                                                   double Primaries[],
21                                                                   double gamma);
22 
cmsCloseProfile(long hProfile)23     protected synchronized native static boolean cmsCloseProfile(long hProfile);
24 
cmsCreateTransform(long inputProfile, int inputFormat, long outputProfile, int outputFormat, int intent, int flags)25     synchronized native static long cmsCreateTransform(long inputProfile, int inputFormat,
26                                                        long outputProfile, int outputFormat,
27                                                        int intent, int flags);
28 
cmsDeleteTransform(long hTransform)29     synchronized native static void cmsDeleteTransform(long hTransform);
30 
cmsDoTransform(long hTransform, byte[] InputBuffer, byte[] OutputBuffer, int size)31     native static void cmsDoTransform(long hTransform, byte[] InputBuffer, byte[] OutputBuffer, int size);
32 
cmsDoTransform(long hTransform, short[] InputBuffer, short[] OutputBuffer, int size)33     native static void cmsDoTransform(long hTransform, short[] InputBuffer, short[] OutputBuffer, int size);
34 
cmsDoTransform(long hTransform, double[] InputBuffer, double[] OutputBuffer, int size)35     native static void cmsDoTransform(long hTransform, double[] InputBuffer, double[] OutputBuffer, int size);
36 
37     static {
38         System.loadLibrary("LCLCMS");
39     }
40 
41 }
42