fix PictureDataFromImage (wrong bounds when Min not (0, 0))

This commit is contained in:
faiface 2017-05-09 01:04:04 +02:00
parent 6ce4094935
commit cfa9180bb7
1 changed files with 2 additions and 2 deletions

View File

@ -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 {