MCPcopy Create free account
hub / github.com/imgproxy/imgproxy / Pages

Method Pages

vips/vips.go:246–252  ·  view source on GitHub ↗

Pages returns number of pages in the image file. WARNING: It's not the number of pages in the loaded image. Use [Image.PagesLoaded] for that.

()

Source from the content-addressed store, hash-verified

244// WARNING: It's not the number of pages in the loaded image.
245// Use [Image.PagesLoaded] for that.
246func (img *Image) Pages() int {
247 p, err := img.GetIntDefault("n-pages", 1)
248 if err != nil {
249 return 1
250 }
251 return p
252}
253
254// PagesLoaded returns number of pages in the loaded image.
255func (img *Image) PagesLoaded() int {

Callers 1

Calls 1

GetIntDefaultMethod · 0.95

Tested by

no test coverage detected