support for resizeMethod
See original GitHub issueHi,
I have a list of rather large images, and I want smooth scroll behavior. If I use react native’s Image
with resizeMethod
set to resize
, I get a performance boost over FastImage
but I lose the caching and loading optimizations of FastImage
.
Is there a reason why FastImage
doesn’t support resizeMethod
prop?
thanks.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:17
- Comments:10 (1 by maintainers)
Top Results From Across the Web
tf.image.ResizeMethod | TensorFlow v2.11.0
Check out sessions from the WiML Symposium covering diffusion models with KerasCV, on-device ML, and more. Watch on demand.
Read more >Image - React Native
The currently supported formats are png , jpg , jpeg , bmp , gif , webp , psd (iOS only). In addition, iOS...
Read more >jax.image.resize - JAX documentation - Read the Docs
The method argument expects one of the following resize methods: ResizeMethod.NEAREST , "nearest". Nearest neighbor interpolation. The values of antialias ...
Read more >tf.image.resize_images( images, size, method=ResizeMethod ...
tf.image.resize_images( images, size, method=ResizeMethod. ... By clicking “Post Your Answer”, you agree to our terms of service, ...
Read more >Application.Resize method (Word) - Microsoft Learn
See also. Application Object. Support and feedback. Have questions or feedback about Office VBA or this documentation? Please see Office VBA ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I haven’t tried forked version, but I have applied “dirty fix” in
FastImageViewManager.java
Just for test I have changed this line.apply(FastImageViewConverter.getOptions(source))
to.apply(FastImageViewConverter.getOptions(source).override(600, 400) )
And on performance was night and day. I was testing feed feature with a lot of images, and it was crashing on the first “page” on Galaxy S6 edge. After changing single line as described above, not only that it wasn’t crashing anymore, but I could scroll like crazy and everything was working 👌
So I really think @adammcarth’s PR should get merged. 🤞
In the mean time, switching from FastImage to regular Image also fixed issue (but performance wise solution described above was better). My image component looks like this now:
Alright, for anyone else having this issue - I’d suggest making sure you’re running at least version
5.1.0
. We were running version4.0.14
, and the upgrade alone seemed to dramatically improve performance from unusable to acceptable. This is (I suspect) largely due to the upgraded major version of Glide.For those still experiencing problems on Android with large down-sized images, I’ve created a fork of the latest version which introduces a new prop to manually downsize images before they’re loaded into the RAM. The only caveat is that you must know the exact resolution that you want to downsize to.
Usage Example:
I’ll submit this as a PR too, no guarantees if it’ll be accepted though.