weserv / images

Source code of wsrv.nl (formerly images.weserv.nl), to be used on your own server(s).
https://wsrv.nl/
BSD 3-Clause "New" or "Revised" License
1.84k stars 187 forks source link

My gif won't load. Input image exceeds pixel limit. Width x height should be less than 71000000 #343

Closed aoaostar closed 2 years ago

aoaostar commented 2 years ago

My gif won't load. It outputs

Input image exceeds pixel limit. Width x height should be less than 71000000

But my picture is in line with the requirements.Why does this problem occur? Thank you. https://images.weserv.nl/?n=-1&url=https://pic.opop.vip/551f16624001291.gif

But the other one is normal.
https://images.weserv.nl/?n=-1&url=https://pic.opop.vip/551f1662a001291.gif

kleisauke commented 2 years ago

The first image exceeds our pixel limit since it is 800x240600 (401 frames, with each frame being 800x600).

$ curl -LO https://pic.opop.vip/551f16624001291.gif
$ vipsheader 551f16624001291.gif
551f16624001291.gif: 800x600 uchar, 4 bands, srgb, gifload
$ vipsheader 551f16624001291.gif[n=-1]
551f16624001291.gif: 800x240600 uchar, 4 bands, srgb, gifload
$ vipsheader -f n-pages 551f16624001291.gif
401

The second image does not exceed our pixel limit since it is 400x49500 (165 frames, with each frame being 400x300).

$ curl -LO https://pic.opop.vip/551f1662a001291.gif
$ vipsheader 551f1662a001291.gif
551f1662a001291.gif: 400x300 uchar, 4 bands, srgb, gifload
$ vipsheader 551f1662a001291.gif[n=-1]
551f1662a001291.gif: 400x49500 uchar, 4 bands, srgb, gifload
$ vipsheader -f n-pages 551f1662a001291.gif
165
aoaostar commented 2 years ago

Well, it would be nice to be able to exceed the maximum number of pages for displaying gifs, after all, it would be uncomfortable if the images could not be displayed. Thank you very much for your answer!