spark-instrumented-optimizer/data/mllib/images
Sid Murching 7bd46d9871 [SPARK-23205][ML] Update ImageSchema.readImages to correctly set alpha values for four-channel images
## What changes were proposed in this pull request?

When parsing raw image data in ImageSchema.decode(), we use a [java.awt.Color](https://docs.oracle.com/javase/7/docs/api/java/awt/Color.html#Color(int)) constructor that sets alpha = 255, even for four-channel images (which may have different alpha values). This PR fixes this issue & adds a unit test to verify correctness of reading four-channel images.

## How was this patch tested?

Updates an existing unit test ("readImages pixel values test" in `ImageSchemaSuite`) to also verify correctness when reading a four-channel image.

Author: Sid Murching <sid.murching@databricks.com>

Closes #20389 from smurching/image-schema-bugfix.
2018-01-25 18:15:29 -06:00
..
kittens [SPARK-21866][ML][PYSPARK] Adding spark image reader 2017-11-22 15:45:45 -08:00
multi-channel [SPARK-23205][ML] Update ImageSchema.readImages to correctly set alpha values for four-channel images 2018-01-25 18:15:29 -06:00
license.txt [SPARK-21866][ML][PYSPARK] Adding spark image reader 2017-11-22 15:45:45 -08:00