#Animated GIFs dimensions super height

18 messages · Page 1 of 1 (latest)

swift cosmos
#

Hey guys! Just checking if this is intended behavior:
When I upload an animated GIF, Payload reads its dimensions summing every frame height, making it super taller. In this case, it is a 2560x1440 file, but it is as 2560x97920 (68 frames)

faint mauve
swift cosmos
#

I think its something deeper than that, because I'm getting this value when calling on API:

faint mauve
#

Sharp used to have a pageHeight prop on gifs

#

I think it restrained the gif from being the height of the total frames

#

But it's not a config prop anymore for gif

swift cosmos
#

:/

faint mauve
#

or

swift cosmos
#

the imageSizes dimensions are ok, though. In most cases I'm getting dimensions values from there - I'm using a "full" image size, which is 2560 x free. But for smaller files, Payload won't upscale and so I end up getting width/height from the original file. Which is messed up in GIFs

faint mauve
#

maybe its just a multiplication error in payload somewhere

swift cosmos
#

by the way, are animated gifs working for you? The changelog for 1.6.17 says that payload is properly resizing animated images, but imageSizes are still just the first frame of GIFs

faint mauve
#

Well first I'd check a cpl things

#

Payload uses probe-image-size

#

to check image dimensions quickly

#

You could see if parsing your gif with that module produces incorrect dimensions

#

Then we could rule that out

swift cosmos
#

Nice, I'll check that. I have a meting in a few minutes, but will get back to this and give you updates, thanks!

swift cosmos
#

hi @faint mauve , just to keep you posted here. I ended up finding a work around to this problem, and had to drop this debugging for now. This product will (hopefully) launch this week, so I'm a little short on time. But will definitely get back here to find out why this is happening, and why my payload won't crop animated gifs properly. Thanks again!