fix(#28): zoom requires extract params

This commit is contained in:
Tomas Aparicio 2015-04-12 11:44:26 +02:00
parent 3f063b6a2f
commit 924be1d3f4
3 changed files with 24 additions and 15 deletions

View file

@ -81,9 +81,10 @@ func (i *Image) Watermark(w Watermark) ([]byte, error) {
return i.Process(options)
}
// Zoom the image by the given factor
func (i *Image) Zoom(level int) ([]byte, error) {
options := Options{Zoom: level}
// Zoom the image by the given factor.
// You should probably call Extract() before
func (i *Image) Zoom(factor int) ([]byte, error) {
options := Options{Zoom: factor}
return i.Process(options)
}