Skip to content

Commit

Permalink
fixed PNG grayscale alpha (suggested from https://github.com/pgundlach
Browse files Browse the repository at this point in the history
…thank you :) )
  • Loading branch information
oneplus1000 committed Jun 9, 2023
1 parent be2f485 commit f74a09a
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions image_obj_parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -427,15 +427,16 @@ func parsePng(f *bytes.Reader, info *imgInfo, imgConfig image.Config) error {

i++
}
info.smask, err = compress(alpha)
if err != nil {
return err
}
}

info.data, err = compress(color)
if err != nil {
return err
}
info.smask, err = compress(alpha)
if err != nil {
return err
}

info.data, err = compress(color)
if err != nil {
return err
}

} else {
Expand Down

0 comments on commit f74a09a

Please sign in to comment.