stb-image 1.0.0 → 1.0.1
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/README.md +1 -1
- data/ext/bindings.c +13 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 11f768b5e8c6576a07760dd2c117df9def3bb82a
|
4
|
+
data.tar.gz: d7aa3c3506ca6ac55c94e3c53c4a18ca88eed49a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d5fe614ff6b6ca5b16af25118da5b577c51658b66c57b42a78b90313ff450824288941c63fb1a851a8f1edac8a639b161cc68ea6d0e1c635ce06aabd1c1dc8d
|
7
|
+
data.tar.gz: 264ba2bfa1a49a7d1b81927d0ee72ac8cc66e307cc9d3c5dd9733574af334cfdf9da0a710944474d07c766947316f5208f6a36726ea6568012108055d6a2e0a8
|
data/README.md
CHANGED
@@ -40,7 +40,7 @@ It's pretty simple. Arguably, at least two or three steps here are optional.
|
|
40
40
|
In addition, if you'd like to load an HDR image or any image as floats instead
|
41
41
|
of bytes, you can use STBI.load_float_image, whose returned data is an array
|
42
42
|
of floats rather than bytes. You can inspect the results of either by using
|
43
|
-
info[0].unpack('f*') for HDR images and `'C*'` for LDR images.
|
43
|
+
`info[0].unpack('f*')` for HDR images and `'C*'` for LDR images.
|
44
44
|
|
45
45
|
|
46
46
|
License (or Lack Thereof)
|
data/ext/bindings.c
CHANGED
@@ -277,6 +277,7 @@ static VALUE sr_load_float_image(int argc, VALUE *argv, VALUE sr_self)
|
|
277
277
|
/*
|
278
278
|
call-seq:
|
279
279
|
set_hdr_to_ldr_gamma(value) => value
|
280
|
+
hdr_to_ldr_gamma = value => value
|
280
281
|
|
281
282
|
Sets the HDR to LDR gamma used when loading HDR images with load_image.
|
282
283
|
*/
|
@@ -289,6 +290,7 @@ static VALUE sr_set_hdr_to_ldr_gamma(VALUE self, VALUE gamma)
|
|
289
290
|
/*
|
290
291
|
call-seq:
|
291
292
|
set_hdr_to_ldr_scale(value) => value
|
293
|
+
hdr_to_ldr_scale = value => value
|
292
294
|
|
293
295
|
Sets the HDR to LDR scale used when loading HDR images with load_image.
|
294
296
|
*/
|
@@ -301,6 +303,7 @@ static VALUE sr_set_hdr_to_ldr_scale(VALUE self, VALUE scale)
|
|
301
303
|
/*
|
302
304
|
call-seq:
|
303
305
|
set_ldr_to_hdr_gamma(value) => value
|
306
|
+
ldr_to_hdr_gamma = value => value
|
304
307
|
|
305
308
|
Sets the LDR to HDR gamma used when loading LDR images with load_float_image.
|
306
309
|
*/
|
@@ -313,6 +316,7 @@ static VALUE sr_set_ldr_to_hdr_gamma(VALUE self, VALUE gamma)
|
|
313
316
|
/*
|
314
317
|
call-seq:
|
315
318
|
set_ldr_to_hdr_scale(value) => value
|
319
|
+
ldr_to_hdr_scale = value => value
|
316
320
|
|
317
321
|
Sets the LDR to HDR scale used when loading LDR images with load_float_image.
|
318
322
|
*/
|
@@ -379,9 +383,14 @@ void Init_stb_image_bindings(void)
|
|
379
383
|
rb_define_singleton_method(s_stbi_module, "load_image", sr_load_image, -1);
|
380
384
|
rb_define_singleton_method(s_stbi_module, "load_float_image", sr_load_float_image, -1);
|
381
385
|
|
382
|
-
rb_define_singleton_method(s_stbi_module, "
|
383
|
-
rb_define_singleton_method(s_stbi_module, "
|
384
|
-
rb_define_singleton_method(s_stbi_module, "
|
385
|
-
rb_define_singleton_method(s_stbi_module, "
|
386
|
+
rb_define_singleton_method(s_stbi_module, "set_hdr_to_ldr_gamma", sr_set_hdr_to_ldr_gamma, 1);
|
387
|
+
rb_define_singleton_method(s_stbi_module, "set_hdr_to_ldr_scale", sr_set_hdr_to_ldr_scale, 1);
|
388
|
+
rb_define_singleton_method(s_stbi_module, "set_ldr_to_hdr_gamma", sr_set_ldr_to_hdr_gamma, 1);
|
389
|
+
rb_define_singleton_method(s_stbi_module, "set_ldr_to_hdr_scale", sr_set_ldr_to_hdr_scale, 1);
|
390
|
+
|
391
|
+
rb_alias(rb_singleton_class(s_stbi_module), rb_intern("hdr_to_ldr_gamma="), rb_intern("set_hdr_to_ldr_gamma"));
|
392
|
+
rb_alias(rb_singleton_class(s_stbi_module), rb_intern("hdr_to_ldr_scale="), rb_intern("set_hdr_to_ldr_scale"));
|
393
|
+
rb_alias(rb_singleton_class(s_stbi_module), rb_intern("ldr_to_hdr_gamma="), rb_intern("set_ldr_to_hdr_gamma"));
|
394
|
+
rb_alias(rb_singleton_class(s_stbi_module), rb_intern("ldr_to_hdr_scale="), rb_intern("set_ldr_to_hdr_scale"));
|
386
395
|
}
|
387
396
|
|