Skip to content

Commit

Permalink
feat: add supports cmyk (#146)
Browse files Browse the repository at this point in the history
  • Loading branch information
ykzts committed Sep 7, 2019
1 parent a992d0e commit 9df3651
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ func decode(src io.Reader) (image.Image, error) {
}

switch img.(type) {
case *image.Gray, *image.RGBA, *image.NRGBA:
case *image.Gray, *image.NRGBA, *image.RGBA:
return img, nil
case *image.RGBA64, *image.NRGBA64, *image.YCbCr, *image.Paletted:
case *image.CMYK, *image.NRGBA64, *image.Paletted, *image.RGBA64, *image.YCbCr:
bounds := img.Bounds()
newImg := image.NewRGBA(bounds)
for y := bounds.Min.Y; y < bounds.Max.Y; y++ {
Expand Down

0 comments on commit 9df3651

Please sign in to comment.