blurhash_decoder 0.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: f0cbe50b7bb5bc4e8aa1d1901f1e7a3720f12136d9ebdfba9e8aa303dd095f3e
4
+ data.tar.gz: 86c86f7b49b351f3f801a7042520edeef8b645b359fc56f0d42ab501ff44ddc9
5
+ SHA512:
6
+ metadata.gz: e6a1b2baea8b812af8b16ec0a4ad01a73503bb38dfea29e68f821a61fdfab76b739dfa55a2d831b8fb3314131fdc65387dc15fb9125651919b4a940d96af59fc
7
+ data.tar.gz: 0002e349b9f7fb4ce28a45fc99f512e33edb01ae35f7f505069b560379d49549b45ce6ccfc06a6b7ae2a9649d0f2fd6708a3cfa532fe26603ce71dfb9f3b7627
@@ -0,0 +1,17 @@
1
+ require "blurhash_decoder/blurhash_decoder"
2
+ require 'base64'
3
+
4
+ class BlurhashDecoder
5
+ include DECODER
6
+ VERSION = "1.0"
7
+
8
+ def decode_blurhash(blurhash, height, width, punch)
9
+ decode(blurhash, height, width, punch)
10
+ base64_image = File.open("tmp/out.png", "rb") do |file|
11
+ Base64.strict_encode64(file.read)
12
+ end
13
+ base64_image
14
+ end
15
+ end
16
+
17
+ # puts BlurhashDecoder.new.decode_blurhash("LEAclNah=_xC0K%LInWo9tE2jvNH", 2, 5, 1)
metadata ADDED
@@ -0,0 +1,44 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: blurhash_decoder
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Rabin Poudyal
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2022-01-28 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: A simple blurhash decoder gem using c.
14
+ email: rabin@trip101.com
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - lib/blurhash_decoder.rb
20
+ - lib/blurhash_decoder/blurhash_decoder.bundle
21
+ homepage: https://rubygems.org/gems/hola
22
+ licenses:
23
+ - MIT
24
+ metadata: {}
25
+ post_install_message:
26
+ rdoc_options: []
27
+ require_paths:
28
+ - lib
29
+ required_ruby_version: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ required_rubygems_version: !ruby/object:Gem::Requirement
35
+ requirements:
36
+ - - ">="
37
+ - !ruby/object:Gem::Version
38
+ version: '0'
39
+ requirements: []
40
+ rubygems_version: 3.1.4
41
+ signing_key:
42
+ specification_version: 4
43
+ summary: A blurhash decoder gem!
44
+ test_files: []