Image frame count #1645
danielebogo
started this conversation in
General
Replies: 3 comments 2 replies
-
Thanks for it. #1647 has been merged and a new version (6.2) was released for this. |
Beta Was this translation helpful? Give feedback.
1 reply
-
Hi @onevcat, Is there a way to store the frame count of an animated image when the image is created? I’m looking for a method to access or cache this information efficiently within the framework. Thanks for the help! Apne tv |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
@onevcat Is it possible to store the animated image frame count when an animated image is created?
When
func animatedImage(data: Data, options: ImageCreatingOptions) -> KFCrossPlatformImage?
is called, theGIFAnimatedImage
has theimages
array populated, so it's easy to just store the frame count.If the no
preloadAll
oronlyFirstFrame
is used, then we can retrieve the same info from theimageSource
withCGImageSourceGetCount(imageSource)
.SDWebImage has this value stored in the image and it's retrieved by each decoder.
I can push a PR if necessary.
Beta Was this translation helpful? Give feedback.
All reactions