Skip to content

Commit

Permalink
ci complaints and better color mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
f01c33 committed May 27, 2024
1 parent 70f4d76 commit c063c3e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func main() {
if !p.IsVerified() {
panic("unverified pixel")
}
color := int(p.GetBlue() * 255)
color := int(p.GetBlue() * float64(len(cm)))
p.SetRed(cm[color][0])
p.SetGreen(cm[color][1])
p.SetBlue(cm[color][2])
Expand All @@ -62,5 +62,8 @@ func main() {
break
}
}
mw.WriteImage(os.Args[2] + "_" + os.Args[1] + "_colormap.jpg")
err = mw.WriteImage(os.Args[2] + "_" + os.Args[1] + "_colormap.jpg")
if err != nil {
panic(err)
}
}

0 comments on commit c063c3e

Please sign in to comment.