Resize GiF #3541
-
Hi, we are getting gif as an image URL from the API. We have to set the same gif image in tabItem..As you know tabItem will take only UIImage object so do you support resize gif ? we are using SDWebImage (5.9.2): |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
You can either use thumbnail decoding (which means, the full size image is even not created, only the thubmnail one is created in memory), the cache key is different from the full one. or transform (the See wiki carefully: https://github.com/SDWebImage/SDWebImage/wiki/Advanced-Usage#thumbnail-decoding-550 |
Beta Was this translation helpful? Give feedback.
-
Hi @dream Piggy ... Do you have any sample where you are doing resizing of
gif for tabItem... if so please share the sample project with me.
…On Tue, May 23, 2023 at 12:09 PM DreamPiggy ***@***.***> wrote:
If the image class is SDAnimatedImage, you shouldn't use re-encode. The
image data buffer is available from animatedImageData property.
If you want to re-scale a SDAnimatedImage (I don't think people do this,
but still possible). You need for-in loop to grap each frame and call that
encodedData(with:frames) animated image encode API. See more in PR
description of 5.15.0
Or I can update this into the wiki
—
Reply to this email directly, view it on GitHub
<#3541 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA4AKH56HACRS3BPRIXWA3LXHRLRBANCNFSM6AAAAAAYG27VFQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
Thanks And Regards
Yogesh Gupta
|
Beta Was this translation helpful? Give feedback.
You can either use thumbnail decoding (which means, the full size image is even not created, only the thubmnail one is created in memory), the cache key is different from the full one.
or transform (the
resizeTransformer
, which means, the full size image is firstly created then resize down, two image object in memory)See wiki carefully: https://github.com/SDWebImage/SDWebImage/wiki/Advanced-Usage#thumbnail-decoding-550