( ctx context.Context, blob *imagor.Blob, width, height int, crop vips.Interesting, size vips.Size, options *vips.LoadOptions, )
| 396 | } |
| 397 | |
| 398 | func (v *Processor) newThumbnailFallback( |
| 399 | ctx context.Context, blob *imagor.Blob, width, height int, crop vips.Interesting, size vips.Size, options *vips.LoadOptions, |
| 400 | ) (img *vips.Image, err error) { |
| 401 | if img, err = v.CheckResolution(v.newImageFromBlob(ctx, blob, options)); err != nil { |
| 402 | return |
| 403 | } |
| 404 | if err = img.ThumbnailImage(width, &vips.ThumbnailImageOptions{ |
| 405 | Height: height, Size: size, Crop: crop, |
| 406 | }); err != nil { |
| 407 | img.Close() |
| 408 | return |
| 409 | } |
| 410 | return img, WrapErr(err) |
| 411 | } |
| 412 | |
| 413 | // NewImage creates new Image from imagor.Blob |
| 414 | func (v *Processor) NewImage(ctx context.Context, blob *imagor.Blob, n, page int, dpi int) (*vips.Image, error) { |
no test coverage detected