DylanVann / react-native-fast-image

🚩 FastImage, performant React Native image component.
MIT License
8.1k stars 1.48k forks source link

Add option to disable interpolation when resizing small images #927

Open FancyFurret opened 1 year ago

FancyFurret commented 1 year ago

Fixes #926

I opted to add pixelPerfect to source, since it makes the android implementation much easier. It may make more sense to add it to FastImageProps, but then I'm not sure how we would access it from Android's getOptions. (Since downsampling/compression/transforming need to be disabled)

It works on my iOS device and sim, and my Android emulator (do not have a physical Android device). I'm still pretty new to React Native, Android, and iOS development so let me know if you see anything wrong!

DylanVann commented 1 year ago

Nice job! I'm not sure pixelPerfect is the best name for this prop. Earlier in the development of this library I thought it would be best to expose the same API for iOS and Android. As time goes on though I'm thinking it's just not always possible. It may be better to expose: