Class PhotometricInterpreterYCbCr

    • Constructor Detail

      • PhotometricInterpreterYCbCr

        public PhotometricInterpreterYCbCr​(int samplesPerPixel,
                                           int[] bitsPerSample,
                                           int predictor,
                                           int width,
                                           int height)
    • Method Detail

      • limit

        public static int limit​(int value,
                                int min,
                                int max)
      • convertYCbCrtoRGB

        public static int convertYCbCrtoRGB​(int Y,
                                            int Cb,
                                            int Cr)
        This method converts a YUV (aka YCbCr) colorspace to a RGB colorspace. This is handy when trying to reconstruct an image in Java from YCbCr transmitted data. This routine expects the data to fall in the standard PC 0..255 range per pixel, with the array dimensions corresponding to the imageWidth and imageHeight. These variables are either set manually in the case of a null constructor, or they are automatically calculated from the image parameter constructor.
        Parameters:
        Y - The Y component set.
        Cb - The Cb component set.
        Cr - The Cr component set.
        Returns:
        R The R component.