Class ColorSpaceUtils

java.lang.Object
bdsup2sub.bitmap.ColorSpaceUtils

final class ColorSpaceUtils extends Object
  • Constructor Details

    • ColorSpaceUtils

      private ColorSpaceUtils()
  • Method Details

    • YCbCr2RGB

      public static int[] YCbCr2RGB(int y, int cb, int cr, boolean useBT601)
      Convert YCBCr color info to RGB
      Parameters:
      y - 8 bit luminance
      cb - 8 bit chrominance blue
      cr - 8 bit chrominance red
      Returns:
      Integer array with red, blue, green component (in this order)
    • RGB2YCbCr

      public static int[] RGB2YCbCr(int r, int g, int b, boolean useBT601)
      Convert RGB color info to YCBCr
      Parameters:
      r - 8 bit red component
      g - 8 bit green component
      b - 8 bit blue component
      Returns:
      Integer array with luminance (Y), chrominance blue (Cb), chrominance red (Cr) (in this order)