You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are upgrading Sharp from 0.2*.0 to 0.30.0 and we discovered that pageHeight property on webp() is not supported anymore.
Our use case is:
Load animated image and extract pageHeight
Extract frames from one tall image
Process each frame separately
Compose frames to one tall image
Save as animated file by using pageHeight
The problem is that each frame is processed by multiple steps. Before each step, new Sharp instance is created with new Sharp({ raw: { ... } }) constructor and the previous result is piped into it.
By this, we are probably loosing some kind of metadata which tells Sharp to save image as animated.
Previously, it was easy to tell the Sharp that the result is animated as you need to provide pageHeight and everything worked as expected.
The text was updated successfully, but these errors were encountered:
deftomat
changed the title
How to produce animated files from RAW instances in 0.30.0
How to produce animated files from RAW instances in 0.30.0?
Apr 12, 2022
Hi Tomáš, yes, as a side effect of improved resizing/cropping of animated images, this scenario is now currently unsupported.
Thinking about the right place in the API for this, perhaps adding an animated: true option to the future possible enhancement of #1580 would make sense as that feature would be a better solution to your problem.
We are upgrading Sharp from
0.2*.0
to0.30.0
and we discovered thatpageHeight
property onwebp()
is not supported anymore.Our use case is:
pageHeight
pageHeight
The problem is that each frame is processed by multiple steps. Before each step, new Sharp instance is created with
new Sharp({ raw: { ... } })
constructor and the previous result is piped into it.By this, we are probably loosing some kind of metadata which tells Sharp to save image as animated.
Previously, it was easy to tell the Sharp that the result is animated as you need to provide
pageHeight
and everything worked as expected.The text was updated successfully, but these errors were encountered: