GithubHelp home page GithubHelp logo

vanniktech / blurhash Goto Github PK

View Code? Open in Web Editor NEW
50.0 3.0 2.0 2.86 MB

BlurHash support for iOS, Android and JVM via Kotlin Multiplatform

License: MIT License

Ruby 6.83% Kotlin 89.09% Swift 4.08%
android backend ios jvm kotlin kotlin-multiplatform

blurhash's Introduction

blurhash

A Kotlin Multiplatform library to use blurhash in your Android App, iOS / Mac App & JVM Backend.

Android iOS JVM
Sample Android Sample iOS Sample JVM

Why?

If you've tried using blurhash, you qickly stumple upon the main repository. They provide sources for Swift, Typescript, Python, Kotlin and C. However:

  • Implementations produce different hashes for the same picture
  • There are no artifacts to consume i.e. no Cocoa Pod or Maven dependency
  • Not all implementations provide both encoding and decoding support
  • Missing sample apps with consistent images and blur hashes

The goal of this library is to solve all of the above mentioned problems, provide a common API and good samples for each platform.

Usage

From Kotlin Multiplatform:

kotlin {
  sourceSets {
    val commonMain by getting {
      dependencies {
        implementation("com.vanniktech:blurhash:0.4.0-SNAPSHOT")
      }
    }
  }
}

From Android / JVM Multiplatform:

dependencies {
  implementation("com.vanniktech:blurhash:0.4.0-SNAPSHOT")
}

From iOS:

pod 'BlurHash', :git => 'https://github.com/vanniktech/blurhash', :tag => "0.4.0-SNAPSHOT"

API

Use com.vanniktech.blurhash.BlurHash directly in your platform specific code to encode as well as decode:

Thanks

Without them this would not exist!

License

Copyright (C) 2022 - Niklas Baudy

Licensed under the MIT License

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.