Open gabrielle-cozart opened 3 years ago
Note, removing .override(GIF_WIDTH, GIF_HEIGHT)
will causes issues, but if you also change the imageView's height to wrap_content
instead of match_parent
(which makes sense anyways). It is possible to remove the override, but it does not fix the blurriness issue.
Note: Original image size is 1024x512. Sizing it down seems to help in making it less blurry, but what is the size causing it to blur?
Wow. Finally found the snippet for gif resizing. Actually I want to save the resized gif to flle. Can you confirm that this code resizes the gif and then return resource?
Glide Version: 4.12.0
Integration libraries: okhttp3-4.8.1
Device/Android Version: Affects all devices/OSs
Issue details / Repro steps / Use case background: Gifs come down from content management system and are loaded into a custom defined component. The gif's width should be set to fill the width of the screen while the height should dynamically adjust to fit the aspect ratio of the image.
Issue is:
Glide.asGif()
call is forcing me to useoverride(width, height)
method or else the gif method doesn't work and nothing is displayed. I don't want to force this width and height and need it to be dynamic because all the data can vary in aspect ratio. When I added the override width and height (only way for me to get the feature to work) the gifs ended up coming out blurry because I set them statically to 300 x 300 in the override. How do I have glide just return them based on the size they are already defined?Glide load line /
GlideModule
(if any) / list Adapter code (if any):Layout XML:
App: https://user-images.githubusercontent.com/82335757/138475358-b16affd9-d81a-4e21-99fd-89b7455a05ef.mp4
Original Asset: