Class: Decoder
- Inherits:
-
Object
- Object
- Decoder
- Defined in:
- ext/libsixel/libsixel.c
Instance Method Summary collapse
Constructor Details
#initialize ⇒ Object
133 134 135 136 137 |
# File 'ext/libsixel/libsixel.c', line 133
static VALUE
sixel_ruby_decoder_initialize(VALUE self)
{
return Qnil;
}
|
Instance Method Details
#encode ⇒ Object
162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 |
# File 'ext/libsixel/libsixel.c', line 162
static VALUE
sixel_ruby_decoder_decode(VALUE self)
{
sixel_decoder_t *decoder;
SIXELSTATUS status;
Data_Get_Struct(self, sixel_decoder_t, decoder);
status = sixel_decoder_decode(decoder);
if (SIXEL_FAILED(status)) {
rb_raise(rb_eRuntimeError,
"sixel_decoder_decode() failed: %s / %s",
sixel_helper_format_error(status),
sixel_helper_get_additional_message());
}
return Qnil;
}
|
#setopt(option, optval) ⇒ Object
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 |
# File 'ext/libsixel/libsixel.c', line 140
static VALUE
sixel_ruby_decoder_setopt(VALUE self, VALUE option, VALUE optval)
{
sixel_decoder_t *decoder;
SIXELSTATUS status;
Data_Get_Struct(self, sixel_decoder_t, decoder);
status = sixel_decoder_setopt(decoder,
*StringValueCStr(option),
StringValueCStr(optval));
if (SIXEL_FAILED(status)) {
rb_raise(rb_eRuntimeError,
"sixel_decoder_setopt() failed: %s / %s",
sixel_helper_format_error(status),
sixel_helper_get_additional_message());
}
return Qnil;
}
|