feat(#26): support zoom. several refactors and fixes

This commit is contained in:
Tomas Aparicio 2015-04-09 02:08:07 +02:00
parent e603ddd10a
commit 58b2be80a5
7 changed files with 62 additions and 16 deletions

View file

@ -92,6 +92,12 @@ func (i *Image) Watermark(image []byte, left, top int) ([]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}
return i.Process(options)
}
// Rotate the image by given angle degrees (0, 90, 180 or 270)
func (i *Image) Rotate(a Angle) ([]byte, error) {
options := Options{Rotate: a}