fix PictureDataFromImage (wrong bounds when Min not (0, 0))
This commit is contained in:
parent
6ce4094935
commit
cfa9180bb7
4
data.go
4
data.go
|
@ -178,8 +178,8 @@ func PictureDataFromImage(img image.Image) *PictureData {
|
|||
pd := MakePictureData(R(
|
||||
float64(rgba.Bounds().Min.X),
|
||||
float64(rgba.Bounds().Min.Y),
|
||||
float64(rgba.Bounds().Dx()),
|
||||
float64(rgba.Bounds().Dy()),
|
||||
float64(rgba.Bounds().Max.X),
|
||||
float64(rgba.Bounds().Max.Y),
|
||||
))
|
||||
|
||||
for i := range pd.Pix {
|
||||
|
|
Loading…
Reference in New Issue