libjpeg-ruby 0.7.2 → 0.8.0
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 +2 -0
- data/ext/jpeg/jpeg.c +17 -2
- data/lib/jpeg/version.rb +1 -1
- metadata +2 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: da83aa3f76a6f55060e85d47cf49a48ddd393258ce6a005453e32ddcebceeb33
         | 
| 4 | 
            +
              data.tar.gz: 0b2b2a6883fd79b6c5da01e9f6098de826a5320ec325f555cf8a2cc2d3e21c55
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 88d8c21a50e6164a3751e4edf67441fa93610b8fd1e06a8186890abca84b1e7aaca577498cd7de63dc35d383f6f9c185f94f1fd650b68de6d32defabe9b15e27
         | 
| 7 | 
            +
              data.tar.gz: 63fdff905d2fdc9a3496149499e3b877fa6bdd07f19fae36464ca7e8f3a2e638cd81f25c6bd08e32bde1567e28a28e191bdda8ca2ccac9df57a850e8fc42964c
         | 
    
        data/README.md
    CHANGED
    
    | @@ -51,6 +51,7 @@ IO.binwrite("test.bgr", raw) | |
| 51 51 | 
             
            | :scale | Rational or Float | T.B.D |
         | 
| 52 52 | 
             
            | :dct_method | String or Symbol | T.B.D |
         | 
| 53 53 | 
             
            | :with_exif | Boolean | Specify whether to read Exif tag. When set to true, the content of Exif tag will included in the meta information. |
         | 
| 54 | 
            +
            | :orientation | Boolean | Specify whether to parse Exif orientation. When set to true, apply orientation for decode result. |
         | 
| 54 55 |  | 
| 55 56 | 
             
            #### supported output format
         | 
| 56 57 | 
             
            RGB RGB24 YUV422 YUYV RGB565 YUV444 YCbCr BGR BGR24 RGBX RGB32 BGRX BGR32 
         | 
| @@ -75,4 +76,5 @@ IO.binwrite("test.jpg", enc << IO.binread("test.raw")) | |
| 75 76 | 
             
            | :quality | Integer | encode quality (0-100) |
         | 
| 76 77 | 
             
            | :scale | Rational or Float | |
         | 
| 77 78 | 
             
            | :dct_method | String or Symbol | T.B.D |
         | 
| 79 | 
            +
            | :orientation | Integer | Specify Exif orientation value (1-8). |
         | 
| 78 80 |  | 
    
        data/ext/jpeg/jpeg.c
    CHANGED
    
    | @@ -905,10 +905,21 @@ static void | |
| 905 905 | 
             
            rb_decoder_free(void* ptr)
         | 
| 906 906 | 
             
            {
         | 
| 907 907 | 
             
              //jpeg_destroy_decompress(&(((jpeg_decode_t*)ptr)->cinfo));
         | 
| 908 | 
            -
             | 
| 909 908 | 
             
              free(ptr);
         | 
| 910 909 | 
             
            }
         | 
| 911 910 |  | 
| 911 | 
            +
            static void
         | 
| 912 | 
            +
            rb_decoder_mark(void* _ptr)
         | 
| 913 | 
            +
            {
         | 
| 914 | 
            +
              jpeg_decode_t* ptr;
         | 
| 915 | 
            +
             | 
| 916 | 
            +
              ptr = (jpeg_decode_t*)_ptr; 
         | 
| 917 | 
            +
             | 
| 918 | 
            +
              if (ptr->orientation.buf != Qnil) {
         | 
| 919 | 
            +
                rb_gc_mark(ptr->orientation.buf);
         | 
| 920 | 
            +
              }
         | 
| 921 | 
            +
            }
         | 
| 922 | 
            +
             | 
| 912 923 | 
             
            static void
         | 
| 913 924 | 
             
            decode_output_message(j_common_ptr cinfo)
         | 
| 914 925 | 
             
            {
         | 
| @@ -983,7 +994,7 @@ rb_decoder_alloc(VALUE self) | |
| 983 994 | 
             
              ptr->orientation.value        = 0;
         | 
| 984 995 | 
             
              ptr->orientation.buf          = Qnil;
         | 
| 985 996 |  | 
| 986 | 
            -
              return Data_Wrap_Struct(decoder_klass,  | 
| 997 | 
            +
              return Data_Wrap_Struct(decoder_klass, rb_decoder_mark, rb_decoder_free, ptr);
         | 
| 987 998 | 
             
            }
         | 
| 988 999 |  | 
| 989 1000 | 
             
            static void
         | 
| @@ -2315,6 +2326,10 @@ do_read_header(jpeg_decode_t* ptr, uint8_t* jpg, size_t jpg_sz) | |
| 2315 2326 | 
             
                jpeg_read_header(&ptr->cinfo, TRUE);
         | 
| 2316 2327 | 
             
                jpeg_calc_output_dimensions(&ptr->cinfo);
         | 
| 2317 2328 |  | 
| 2329 | 
            +
                if (TEST_FLAG(ptr, F_APPLY_ORIENTATION)) {
         | 
| 2330 | 
            +
                  pick_exif_orientation(ptr);
         | 
| 2331 | 
            +
                }
         | 
| 2332 | 
            +
             | 
| 2318 2333 | 
             
                ret = create_meta(ptr);
         | 
| 2319 2334 |  | 
| 2320 2335 | 
             
                jpeg_destroy_decompress(&ptr->cinfo);
         | 
    
        data/lib/jpeg/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: libjpeg-ruby
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0. | 
| 4 | 
            +
              version: 0.8.0
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Hiroshi Kuwagata
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: exe
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2019-08- | 
| 11 | 
            +
            date: 2019-08-15 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: bundler
         |