Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SPARK-23205][ML] Update ImageSchema.readImages to correctly set alph…
…a 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. (cherry picked from commit 7bd46d9) Signed-off-by: Sean Owen <sowen@cloudera.com>
- Loading branch information