react-native-blurhash

🖼️ A library to show colorful blurry placeholders while your content loads.

MIT License

Downloads
35.3K
Stars
1.8K
Committers
14

Bot releases are hidden (Show)

react-native-blurhash - Average Color support!

Published by mrousavy about 4 years ago

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:
    const color = Blurhash.getAverageColor('LGFFaXYk^6#M@-5c,1J5@[or[Q6.')
    
    This function decodes the characters 3 to 6 ('FFaX') using the Typescript decode83 function.
  • Update dependencies

react-native-blurhash

react-native-blurhash - Performance improvements

Published by mrousavy about 4 years ago

This release includes:

  • Support for react native 0.63
  • Greatly improved performance for Android:
    • Use ImageView instead of ReactImageView 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)
  • Update dependencies

react-native-blurhash

react-native-blurhash - Bugfixes and Refactor

Published by mrousavy over 4 years ago

  • Improve encode() performance on iOS by using qos: .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
react-native-blurhash - Native Blurhash Encoder with Base64

Published by mrousavy over 4 years ago

This release includes:

  • Support for base64 data (starts with data:image/) in addition to URLs (starts with http) for Image encoding. (Blurhash.encode)
react-native-blurhash - Native Blurhash Encoder!

Published by mrousavy over 4 years ago

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 to BlurhashViewManager and BlurhashViewModule)

1.0.15 is now on npm

npm i react-native-blurhash
react-native-blurhash - Native Blurhash encoder!

Published by mrousavy over 4 years ago

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
react-native-blurhash - Async renderer!

Published by mrousavy over 4 years ago

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 Blurhash decode function running on the UI-Thread (Main). Be aware: Only use this if you are experiencing those stutters, otherwise it will be slower than the decodeAsync={false}, since the Thread-start overhead is very high.
  • Bugfixes
    • Fixes wrong default resizeMode on iOS.
  • README and Docs improvements
npm i react-native-blurhash
react-native-blurhash - Bugfixes and README

Published by mrousavy over 4 years ago

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!

react-native-blurhash - Resize Mode and cache improvements!

Published by mrousavy over 4 years ago

Second release includes:

  • resizeMode support
  • better caching
  • directly write image on Android instead of writing to background property

check it out!

react-native-blurhash - Initial release

Published by mrousavy over 4 years ago

First release

  • iOS Implementation
  • Android Implementation
  • Performance optimizations
  • Redraw Caching
  • Types