mirror of
https://github.com/imgproxy/imgproxy.git
synced 2025-10-10 20:22:31 +02:00
Fix loading animated images with a huge number of frames
This commit is contained in:
@@ -292,6 +292,14 @@ func (img *Image) Height() int {
|
||||
return int(img.VipsImage.Ysize)
|
||||
}
|
||||
|
||||
func (img *Image) Pages() int {
|
||||
p, err := img.GetIntDefault("n-pages", 1)
|
||||
if err != nil {
|
||||
return 1
|
||||
}
|
||||
return p
|
||||
}
|
||||
|
||||
func (img *Image) Load(imgdata *imagedata.ImageData, shrink int, scale float64, pages int) error {
|
||||
if imgdata.Type == imagetype.ICO {
|
||||
return img.loadIco(imgdata.Data, shrink, scale, pages)
|
||||
|
Reference in New Issue
Block a user