Package bdsup2sub.bitmap
Class ColorSpaceUtils
java.lang.Object
bdsup2sub.bitmap.ColorSpaceUtils
-
Constructor Summary
Constructors -
Method Summary
-
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 luminancecb
- 8 bit chrominance bluecr
- 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 componentg
- 8 bit green componentb
- 8 bit blue component- Returns:
- Integer array with luminance (Y), chrominance blue (Cb), chrominance red (Cr) (in this order)
-