feat(#27, #25): new features

This commit is contained in:
Tomas Aparicio 2015-04-11 02:49:11 +02:00
parent 58b2be80a5
commit cc2290cb45
8 changed files with 305 additions and 88 deletions

View file

@ -111,8 +111,13 @@ func TestImageWatermark(t *testing.T) {
t.Errorf("Cannot process the image: %#v", err)
}
insert, _ := Read("fixtures/watermark.png")
buf, err := image.Watermark(insert, 10, 10)
buf, err := image.Watermark(Watermark{
Text: "Copy me if you can",
Opacity: 0.5,
Width: 200,
DPI: 100,
Background: Color{255, 255, 255},
})
if err != nil {
t.Error(err)
}