(wscale, hscale float64)
| 576 | } |
| 577 | |
| 578 | func (img *Image) Resize(wscale, hscale float64) error { |
| 579 | var tmp *C.VipsImage |
| 580 | |
| 581 | if C.vips_resize_go(img.VipsImage, &tmp, C.double(wscale), C.double(hscale)) != 0 { |
| 582 | return Error() |
| 583 | } |
| 584 | |
| 585 | if wscale < 1.0 || hscale < 1.0 { |
| 586 | C.vips_image_set_int(tmp, cachedCString("imgproxy-scaled-down"), 1) |
| 587 | } |
| 588 | |
| 589 | img.swapAndUnref(tmp) |
| 590 | |
| 591 | return nil |
| 592 | } |
| 593 | |
| 594 | func (img *Image) Orientation() C.int { |
| 595 | return C.vips_get_orientation(img.VipsImage) |
no test coverage detected