(self)
return self.__rgb
Compute RGB values from the BGRA raw pixels.

        :return bytes: RGB pixels.
Compute RGB values from the BGRA raw pixels.
Compute RGB values from the BGRA raw pixels .
def rgb(self):
        # type: () -> bytes
        """
        Compute RGB values from the BGRA raw pixels.

        :return bytes: RGB pixels.
        """

        if not self.__rgb:
            rgb = bytearray(self.height * self.width * 3)
            raw = self.raw
            rgb[0::3] = raw[2::4]
            rgb[1::3] = raw[1::4]
            rgb[2::3] = raw[0::4]
            self.__rgb = bytes(rgb)

        return self.__rgb
def rgb ( self ) : # type: () -> bytes if not self . __rgb : rgb = bytearray ( self . height * self . width * 3 ) raw = self . raw rgb [ 0 : : 3 ] = raw [ 2 : : 4 ] rgb [ 1 : : 3 ] = raw [ 1 : : 4 ] rgb [ 2 : : 3 ] = raw [ 0 : : 4 ] self . __rgb = bytes ( rgb ) return self . __rgb