Class ColorSpace

  • All Implemented Interfaces:
    java.lang.AutoCloseable

    public class ColorSpace
    extends Managed
    • Constructor Detail

      • ColorSpace

        @Internal
        public ColorSpace​(long ptr)
      • ColorSpace

        @Internal
        public ColorSpace​(long ptr,
                          boolean managed)
    • Method Detail

      • getSRGBLinear

        public static ColorSpace getSRGBLinear()
      • getDisplayP3

        public static ColorSpace getDisplayP3()
      • isGammaCloseToSRGB

        public boolean isGammaCloseToSRGB()
        Returns:
        true if the color space gamma is near enough to be approximated as sRGB
      • isGammaLinear

        public boolean isGammaLinear()
        Returns:
        true if the color space gamma is linear
      • isSRGB

        public boolean isSRGB()

        Returns true if the color space is sRGB. Returns false otherwise.

        This allows a little bit of tolerance, given that we might see small numerical error in some cases: converting ICC fixed point to float, converting white point to D50, rounding decisions on transfer function and matrix.

        This does not consider a 2.2f exponential transfer function to be sRGB. While these functions are similar (and it is sometimes useful to consider them together), this function checks for logical equality.

      • _nGetFinalizer

        public static long _nGetFinalizer()
      • _nMakeSRGB

        public static long _nMakeSRGB()
      • _nMakeDisplayP3

        public static long _nMakeDisplayP3()
      • _nMakeSRGBLinear

        public static long _nMakeSRGBLinear()
      • _nConvert

        public static float[] _nConvert​(long fromPtr,
                                        long toPtr,
                                        float r,
                                        float g,
                                        float b,
                                        float a)
      • _nIsGammaCloseToSRGB

        public static boolean _nIsGammaCloseToSRGB​(long ptr)
      • _nIsGammaLinear

        public static boolean _nIsGammaLinear​(long ptr)
      • _nIsSRGB

        public static boolean _nIsSRGB​(long ptr)