barf 1.0.1 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -0
- data/lib/barf.rb +2 -0
- data/lib/barf/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c096e860431d590bd5ff7cbf3e632d890c0633d61e0d27126177a32687c05563
|
4
|
+
data.tar.gz: 3b1a9269300643dd22f02adab5cb3dacbc5628f82aecd5e75954cbca077a2007
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e1782fc7f052638741fe196820304ef874f29a600e5e1c8f22de62f7a6a334b63e8fa7fe8527b561988736e9a63c1ee96608dd14168aa2f40bba2677038035e8
|
7
|
+
data.tar.gz: e42184fd43f2a2c55837f537e95342752f68925c59749f88c3845795ee80b9cd4ebc76fb4ae969e4bd9cacad95052da4ab7a495d64a01bc5cf217f6d8fa222a1
|
data/README.md
CHANGED
@@ -14,6 +14,16 @@ accomplish this, but they're all way too complex.
|
|
14
14
|
![Example](README.png)
|
15
15
|
|
16
16
|
|
17
|
+
## Details
|
18
|
+
* Can display anything supported by imagemagick including web resources.
|
19
|
+
* Applies the 256 color extended Ansi color palette with dithering.
|
20
|
+
* Multithreading is used to speed up the `tco` color operations.
|
21
|
+
|
22
|
+
```bash
|
23
|
+
$ barf https://avatars2.githubusercontent.com/u/382216
|
24
|
+
```
|
25
|
+
|
26
|
+
|
17
27
|
## Contributing
|
18
28
|
|
19
29
|
Bug reports and pull requests are welcome on GitHub at https://github.com/duffyjp/barf.
|
data/lib/barf.rb
CHANGED
@@ -17,6 +17,8 @@ module Barf
|
|
17
17
|
new_height = [2, (image.height * (0.5 * terminal_width / image.width)).to_i * 2].max
|
18
18
|
|
19
19
|
image.combine_options do |tmp|
|
20
|
+
tmp.alpha 'remove'
|
21
|
+
tmp.flatten
|
20
22
|
tmp.resize "#{terminal_width}x#{new_height}!"
|
21
23
|
tmp.dither 'FloydSteinberg'
|
22
24
|
tmp.remap @palette
|
data/lib/barf/version.rb
CHANGED