to Bitmap
fun <P : ImageProcessor> P.toBitmap(width: Int, height: Int, rotationDegrees: Int = Int.MIN_VALUE, purpose: ImageProcessor.Output.Purpose = ImageProcessor.Output.Purpose.SNAPSHOT): Bitmap?
If ImageProcessor.Input is currently connected to this processor, process the input and outputs the result as Bitmap for the specified width and height dimensions and an optional rotationDegrees as well as purpose. This method is a blocking operation therefore it is expected to run on a worker thread.
Return
processed input result as Bitmap or null in case of failure or the provided parameters are not supported.