stb-image 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/ext/bindings.c +13 -4
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e73e6f2f11e07296a4a09386b46fb9bef372ecc8
4
- data.tar.gz: 0d84e354e6971e9e101af7cf35c41e5fa6ec7d3e
3
+ metadata.gz: 11f768b5e8c6576a07760dd2c117df9def3bb82a
4
+ data.tar.gz: d7aa3c3506ca6ac55c94e3c53c4a18ca88eed49a
5
5
  SHA512:
6
- metadata.gz: 38253ce9a581f1afadf8ffb3247c25a7fe54b83e0b2684e6ba39d27dbc084881ac80ee9974b329af0b4577b2d8d51bb921028cc59d33e699be8ce255ee94151f
7
- data.tar.gz: 08ae2c60e53410e2faa892b9709aab3b91453af266b463465908d38916c07ee78c12c4932075597adf94b346f4c3445b82548cd30d4e8d5ea7090900a30c9011
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)
@@ -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, "hdr_to_ldr_gamma=", sr_set_hdr_to_ldr_gamma, 1);
383
- rb_define_singleton_method(s_stbi_module, "hdr_to_ldr_scale=", sr_set_hdr_to_ldr_scale, 1);
384
- rb_define_singleton_method(s_stbi_module, "ldr_to_hdr_gamma=", sr_set_ldr_to_hdr_gamma, 1);
385
- rb_define_singleton_method(s_stbi_module, "ldr_to_hdr_scale=", sr_set_ldr_to_hdr_scale, 1);
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
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stb-image
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Noel Raymond Cower