rfreeimage 0.1.3 → 0.1.5
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/rfreeimage/rfi_main.c +8 -2
- data/lib/rfreeimage/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: 3037632a027335cbbed19c60769235c56713f77d
         | 
| 4 | 
            +
              data.tar.gz: 1d1994a1051e7b32cd16e7277a61a3e1829a286f
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 1fc05e814346fa10af49cc04ad96b4cc31958a3bb289a0ccd50839817c1eb0339b52001db7232db0d861aae828e3d01289a7f2cf2320e4fd9690da72537bdc8f
         | 
| 7 | 
            +
              data.tar.gz: d5af3bb4a6f892e2afeacaefdcf0f1d9a61685c9db92f7c4f78905d00a0cce5ca7213a32c15d3b0e4e854783eb9fc0cbb7f8f2bfd84bfd715a634081ec6f9a70
         | 
    
        data/ext/rfreeimage/rfi_main.c
    CHANGED
    
    | @@ -101,7 +101,9 @@ rd_image(VALUE clazz, VALUE file, struct native_image *img, unsigned int bpp, BO | |
| 101 101 | 
             
            	}
         | 
| 102 102 |  | 
| 103 103 | 
             
            	if (ping) flags |= FIF_LOAD_NOPIXELS;
         | 
| 104 | 
            -
            	 | 
| 104 | 
            +
            	// use JPEG_ACCURATE to keep sync with opencv
         | 
| 105 | 
            +
            	if (in_fif == FIF_JPEG)
         | 
| 106 | 
            +
            		flags |= JPEG_EXIFROTATE | JPEG_ACCURATE;
         | 
| 105 107 | 
             
            	orig = FreeImage_Load(in_fif, filename, flags);
         | 
| 106 108 | 
             
            	free(filename);
         | 
| 107 109 | 
             
            	if (!orig)
         | 
| @@ -127,6 +129,7 @@ rd_image_blob(VALUE clazz, VALUE blob, struct native_image *img, unsigned int bp | |
| 127 129 | 
             
            {
         | 
| 128 130 | 
             
            	FIBITMAP *h = NULL, *orig = NULL;
         | 
| 129 131 | 
             
            	FIMEMORY *fmh;
         | 
| 132 | 
            +
            	int flags = 0;
         | 
| 130 133 | 
             
            	FREE_IMAGE_FORMAT in_fif;
         | 
| 131 134 |  | 
| 132 135 | 
             
            	Check_Type(blob, T_STRING);
         | 
| @@ -138,7 +141,10 @@ rd_image_blob(VALUE clazz, VALUE blob, struct native_image *img, unsigned int bp | |
| 138 141 | 
             
            		rb_raise(rb_eIOError, "Invalid image blob");
         | 
| 139 142 | 
             
            	}
         | 
| 140 143 |  | 
| 141 | 
            -
            	 | 
| 144 | 
            +
            	if (ping) flags |= FIF_LOAD_NOPIXELS;
         | 
| 145 | 
            +
            	if (in_fif == FIF_JPEG)
         | 
| 146 | 
            +
            		flags |= JPEG_EXIFROTATE | JPEG_ACCURATE;
         | 
| 147 | 
            +
            	orig = FreeImage_LoadFromMemory(in_fif, fmh, flags);
         | 
| 142 148 | 
             
            	FreeImage_CloseMemory(fmh);
         | 
| 143 149 | 
             
            	if (!orig)
         | 
| 144 150 | 
             
            		rb_raise(rb_eIOError, "Fail to load image from memory");
         | 
    
        data/lib/rfreeimage/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: rfreeimage
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.1. | 
| 4 | 
            +
              version: 0.1.5
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Yuheng Chen
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2015- | 
| 11 | 
            +
            date: 2015-11-06 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: rake-compiler
         |