libsixel-ruby 0.0.1 → 0.0.2
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 +4 -4
- data/ext/libsixel/libsixel.c +18 -2
- data/lib/libsixel/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a71d7cff4eb70e795c0e67da961b7893f3c162e6
|
|
4
|
+
data.tar.gz: f7406947c034964f1840d335b321a96f4ec3c564
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 82633f6b10a9cea22a7fa510029ac59954cc7b282017ccef9eafa8dbda80906e571c93b8652dac82381a6a670e5050ba653d4fcf13080e17738d985370748921
|
|
7
|
+
data.tar.gz: 548b91c9f651a9f28765356356c4e758c4aac8bf899f1bbe0797514236dd9c506fcc438e6d4248176eca3c8e83ac90ce2a41bbf587a360e7b1304cc4892997fa
|
data/ext/libsixel/libsixel.c
CHANGED
|
@@ -42,8 +42,16 @@ static VALUE
|
|
|
42
42
|
sixel_ruby_encoder_alloc(VALUE klass)
|
|
43
43
|
{
|
|
44
44
|
sixel_encoder_t *encoder;
|
|
45
|
+
SIXELSTATUS status;
|
|
46
|
+
|
|
47
|
+
status = sixel_encoder_new(&encoder, NULL);
|
|
48
|
+
if (SIXEL_FAILED(status)) {
|
|
49
|
+
rb_raise(rb_eRuntimeError,
|
|
50
|
+
"sixel_encoder_new() failed: %s / %s",
|
|
51
|
+
sixel_helper_format_error(status),
|
|
52
|
+
sixel_helper_get_additional_message());
|
|
53
|
+
}
|
|
45
54
|
|
|
46
|
-
encoder = sixel_encoder_create();
|
|
47
55
|
return Data_Wrap_Struct(klass, NULL, sixel_ruby_encoder_free, encoder);
|
|
48
56
|
}
|
|
49
57
|
|
|
@@ -108,8 +116,16 @@ static VALUE
|
|
|
108
116
|
sixel_ruby_decoder_alloc(VALUE klass)
|
|
109
117
|
{
|
|
110
118
|
sixel_decoder_t *decoder;
|
|
119
|
+
SIXELSTATUS status;
|
|
120
|
+
|
|
121
|
+
status = sixel_decoder_new(&decoder, NULL);
|
|
122
|
+
if (SIXEL_FAILED(status)) {
|
|
123
|
+
rb_raise(rb_eRuntimeError,
|
|
124
|
+
"sixel_encoder_encode() failed: %s / %s",
|
|
125
|
+
sixel_helper_format_error(status),
|
|
126
|
+
sixel_helper_get_additional_message());
|
|
127
|
+
}
|
|
111
128
|
|
|
112
|
-
decoder = sixel_decoder_create();
|
|
113
129
|
return Data_Wrap_Struct(klass, NULL, sixel_ruby_decoder_free, decoder);
|
|
114
130
|
}
|
|
115
131
|
|
data/lib/libsixel/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: libsixel-ruby
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Hayaki Saito
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-06
|
|
11
|
+
date: 2015-08-06 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|