Merge pull request #24 from egonSchiele/master

make FromImage work with gifs
This commit is contained in:
Chih-Wei Chang 2014-10-21 19:59:05 +08:00
commit 1e791cbaa7
2 changed files with 3 additions and 3 deletions

View file

@ -30,7 +30,7 @@ func FromImage(img image.Image) *IplImage {
c := model.Convert(px).(color.RGBA) c := model.Convert(px).(color.RGBA)
value := NewScalar(float64(c.B), float64(c.G), float64(c.R), float64(c.A)) value := NewScalar(float64(c.B), float64(c.G), float64(c.R), float64(c.A))
dst.Set2D(x, y, value) dst.Set2D(x-b.Min.X, y-b.Min.Y, value)
} }
} }