spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From viirya <...@git.apache.org>
Subject [GitHub] spark pull request #20389: [SPARK-23205][ML] Update ImageSchema.readImages t...
Date Thu, 25 Jan 2018 06:02:47 GMT
Github user viirya commented on a diff in the pull request:

    https://github.com/apache/spark/pull/20389#discussion_r163756581
  
    --- Diff: mllib/src/main/scala/org/apache/spark/ml/image/ImageSchema.scala ---
    @@ -169,8 +169,7 @@ object ImageSchema {
             var offset = 0
             for (h <- 0 until height) {
               for (w <- 0 until width) {
    -            val color = new Color(img.getRGB(w, h))
    -
    +            val color = new Color(img.getRGB(w, h), nChannels == 4)
    --- End diff --
    
    Why don't directly use `hasAlpha`?


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message