Releases: mrousavy/react-native-blurhash
Releases · mrousavy/react-native-blurhash
Average Color support!
This release includes:
- Average Color extracter. Spice up your app's UI with contextual colors depending on the Blurhash's average/dominant color. Get the Blurhash's average color with:
This function decodes the characters 3 to 6 (
const color = Blurhash.getAverageColor('LGFFaXYk^6#M@-5c,1J5@[or[Q6.')
'FFaX'
) using the Typescriptdecode83
function. - Update dependencies
Performance improvements
This release includes:
- Support for react native 0.63
- Greatly improved performance for Android:
- Use
ImageView
instead ofReactImageView
to remove unnecessary overhead from Fresco/React - Use an array for writing pixel colors
- Cache Image Cosines X/Y
- Use
CHAR_MAP
- Clear Image Cosines cache on view destroy (
onHostDestroy
)
- Use
- Update dependencies
Bugfixes and Refactor
- Improve
encode()
performance on iOS by usingqos: .utility
quality of service for background task - Refactor iOS Swift source code
- Join shared code in a single file
- Split class and view extensions
- README changes
get 1.0.17 from npm
npm i react-native-blurhash
Native Blurhash Encoder with Base64
This release includes:
- Support for base64 data (starts with
data:image/
) in addition to URLs (starts withhttp
) for Image encoding. (Blurhash.encode
)
Native Blurhash Encoder!
This release includes:
- An all new Image encoder! Asynchronously encode Images to Blurhashes straight out of your React Native app:
const blurhash = await Blurhash.encode('https://blurha.sh/assets/images/img2.jpg', 4, 3);
- Supports Android and iOS
- Completely run async on background Thread
- Easy JS API, only
imageUri, componentsX, componentsY
as parameters
- Performance improvements for decoding
- Cache improvements to not spawn new threads when not needed
- Improved logging (and warning when props are misused)
- Bugfixes
- Refactoring
- Remove unused imports/includes
- Remap Objective-C module for correct name (
BlurhashView
, so it resolves toBlurhashViewManager
andBlurhashViewModule
)
npm i react-native-blurhash
Native Blurhash encoder!
This release includes:
- An all new Image encoder! Asynchronously encode Images to Blurhashes straight out of your React Native app:
const blurhash = await Blurhash.encode('https://blurha.sh/assets/images/img2.jpg', 4, 3);
- Performance improvements for decoding
- Cache improvements to not spawn new threads when not needed
- Improved logging (and warning when props are misused)
- Bugfixes
- Refactoring
Async renderer!
Version 1.0.11 includes:
- A new async renderer! By using
decodeAsync={true}
, you can decode the Blurhash asynchronously on a background Thread. This is especially useful for large Lists, since this removes any stutters that may have been caused by the Blurhashdecode
function running on the UI-Thread (Main). Be aware: Only use this if you are experiencing those stutters, otherwise it will be slower than thedecodeAsync={false}
, since the Thread-start overhead is very high. - Bugfixes
- Fixes wrong default
resizeMode
on iOS.
- Fixes wrong default
- README and Docs improvements
npm i react-native-blurhash
Bugfixes and README
This release includes:
- Bugfixes
- Fix resizeMode crashing the app (wrong selector error on iOS)
- Fix resizeMode default value to be the same as on default react Image (RCTImage):
cover
- Better README with GIFs and formatting
check it out on npm!
Resize Mode and cache improvements!
Second release includes:
- resizeMode support
- better caching
- directly write image on Android instead of writing to background property
Initial release
First release
- iOS Implementation
- Android Implementation
- Performance optimizations
- Redraw Caching
- Types