Skip to content

Commit

Permalink
Fixed Lab bounds
Browse files Browse the repository at this point in the history
  • Loading branch information
peterwilliams97 committed Aug 7, 2017
1 parent a96a007 commit f840c1c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pdf/model/colorspace.go
Original file line number Diff line number Diff line change
Expand Up @@ -1413,19 +1413,19 @@ func (this *PdfColorspaceLab) ColorFromFloats(vals []float64) (PdfColor, error)

// L
l := vals[0]
if l < 0.0 || l > 1.0 {
if l < 0.0 || l > 100.0 {
return nil, errors.New("Range check")
}

// A
a := vals[1]
if a < 0.0 || a > 1.0 {
if a < -128.0 || a > 127.0 {
return nil, errors.New("Range check")
}

// B.
b := vals[2]
if b < 0.0 || b > 1.0 {
if b < -128.0 || b > 127.0 {
return nil, errors.New("Range check")
}

Expand Down

0 comments on commit f840c1c

Please sign in to comment.