All Projects → Sija → blurhash.cr

Sija / blurhash.cr

Licence: MIT License
A pure Crystal implementation of BlurHash algorithm

Programming Languages

crystal
512 projects

Projects that are alternatives of or similar to blurhash.cr

blurhash-as
Blurhash implementation in AssemblyScript
Stars: ✭ 26 (+100%)
Mutual labels:  blurhash
DPB
Dynamic Project Builder
Stars: ✭ 22 (+69.23%)
Mutual labels:  placeholder
placeholders
SVG-based placeholders in web components
Stars: ✭ 28 (+115.38%)
Mutual labels:  placeholder
react-loading-placeholder
Loading placeholer, inspired by Facebook
Stars: ✭ 17 (+30.77%)
Mutual labels:  placeholder
blurhash-rs
A pure Rust implementation of Blurhash
Stars: ✭ 29 (+123.08%)
Mutual labels:  blurhash
NetworkImage
Asynchronous image loading in SwiftUI
Stars: ✭ 39 (+200%)
Mutual labels:  placeholder
Aiforms.effects
AiForms.Effects for Xamarin.Forms
Stars: ✭ 245 (+1784.62%)
Mutual labels:  placeholder
webpack-image-placeholder-loader
Generate a solid color image as placeholder
Stars: ✭ 24 (+84.62%)
Mutual labels:  placeholder
docheader
A small tool to check license headers
Stars: ✭ 65 (+400%)
Mutual labels:  placeholder
promise
Common interface for simple asynchronous placeholders.
Stars: ✭ 66 (+407.69%)
Mutual labels:  placeholder
lorem.space
✨✨✨🪐✨✨✨  LOREM.SPACE ✨✨✨🪐✨✨✨
Stars: ✭ 310 (+2284.62%)
Mutual labels:  placeholder
NSJTextField
A custom textfield with the placeholder displayed on top when text entered.
Stars: ✭ 30 (+130.77%)
Mutual labels:  placeholder
STTextView
📝 STTextView is a light-weight library that adds a placeholder to the UITextView.
Stars: ✭ 36 (+176.92%)
Mutual labels:  placeholder
blurhash
A PHP implementation of BlurHash with Laravel integration.
Stars: ✭ 46 (+253.85%)
Mutual labels:  blurhash
TextInputLayout
The objective of this code is to guide you to create login screen with TextInputLayout in iOS app.
Stars: ✭ 30 (+130.77%)
Mutual labels:  placeholder
holder rails
Client side image placeholders for Rails applications
Stars: ✭ 47 (+261.54%)
Mutual labels:  placeholder
SkeletonPlaceholderView
A library for creating dynamic skeleton view
Stars: ✭ 25 (+92.31%)
Mutual labels:  placeholder
python-lorem
🐍 Python library for the generation of random text that looks like Latin
Stars: ✭ 19 (+46.15%)
Mutual labels:  placeholder
i3blocks-modules
Custom modules for i3blocks status bar
Stars: ✭ 36 (+176.92%)
Mutual labels:  placeholder
DevLorem
No more 'Lorem ipsum', get some real quotes or speeches for your free text with this generator!
Stars: ✭ 59 (+353.85%)
Mutual labels:  placeholder

blurhash.cr CI Releases License

A pure Crystal implementation of Blurhash. The API is stable, however the hashing function in either direction may not be.

Blurhash is an algorithm written by Dag Ågren for Wolt (woltapp/blurhash) that encodes an image into a short (~20-30 byte) ASCII string. When you decode the string back into an image, you get a gradient of colors that represent the original image. This can be useful for scenarios where you want an image placeholder before loading, or even to censor the contents of an image à la Mastodon.

Currently supports PNG and JPEG file types.

Installation

Library

  1. Add the dependency to your shard.yml:

    dependencies:
      blurhash:
        github: Sija/blurhash.cr
  2. Run shards install

CLI

  1. Run shards build --release

Usage

Library

require "blurhash"

puts Blurhash.encode(
  x_components: 4,
  y_components: 3,
  path: Path["foo.png"]
)

CLI

$ ./bin/blurhash 4 3 foo.png

Contributing

  1. Fork it (https://github.com/Sija/blurhash.cr/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].