exif 2.2.0 → 2.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/ext/exif/data.c +10 -7
- data/ext/exif/exif.c +7 -4
- data/lib/exif/version.rb +1 -1
- metadata +12 -27
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 2c6e39047ca990d8de0501f004d20125f203f3dc709b8c82e63c41af05689169
|
4
|
+
data.tar.gz: 2f6328707424b868243624554e3909ac7957a1a1dd6fffdedef4dd98d3a20c77
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f063d81c93f73a012450e09315aab85afe7c7ac2257d017fa91144f10fc7ea783e6bb3a74470f441b8a373841ac436e2a41ac7340c3bbc989f39f75b311cce0
|
7
|
+
data.tar.gz: 9632cc061012ed9234ce2f1193d72b71119d40b8a970f8e63004f1f0976de751de4bbf2d68c3752f5ba04eef27322c1a3bbe4de9809b2e8a0befbfbfa9d8a537
|
data/ext/exif/data.c
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
#include "data.h"
|
2
2
|
#include "ruby.h"
|
3
3
|
|
4
|
-
#include <libexif/exif-log.h>
|
5
4
|
#include <libexif/exif-data.h>
|
6
5
|
#include <libexif/exif-loader.h>
|
6
|
+
#include <libexif/exif-log.h>
|
7
7
|
#include <stdint.h>
|
8
8
|
#include <time.h>
|
9
9
|
|
@@ -208,7 +208,7 @@ VALUE new (VALUE self, VALUE input) {
|
|
208
208
|
ed = exif_data_new();
|
209
209
|
exif_data_log(ed, log);
|
210
210
|
exif_data_load_data(ed, (unsigned char *)RSTRING_PTR(input),
|
211
|
-
RSTRING_LEN(input));
|
211
|
+
(uint32_t)RSTRING_LEN(input));
|
212
212
|
exif_log_unref(log);
|
213
213
|
if (corrupt) {
|
214
214
|
exif_data_free(ed);
|
@@ -222,7 +222,7 @@ VALUE new (VALUE self, VALUE input) {
|
|
222
222
|
if (TYPE(buffer) == T_NIL)
|
223
223
|
break;
|
224
224
|
if (!exif_loader_write(loader, (unsigned char *)RSTRING_PTR(buffer),
|
225
|
-
RSTRING_LEN(buffer)))
|
225
|
+
(uint32_t)RSTRING_LEN(buffer)))
|
226
226
|
break;
|
227
227
|
}
|
228
228
|
ed = exif_loader_get_data(loader);
|
@@ -249,7 +249,6 @@ static VALUE brackets(VALUE self, VALUE ifd_symbol) {
|
|
249
249
|
}
|
250
250
|
|
251
251
|
static void each_content(ExifContent *ec, void *self_ptr) {
|
252
|
-
VALUE *self;
|
253
252
|
ExifIfd ifd;
|
254
253
|
|
255
254
|
ifd = exif_content_get_ifd(ec);
|
@@ -266,6 +265,12 @@ static void each_entry(ExifEntry *entry, void *self_ptr) {
|
|
266
265
|
|
267
266
|
ivar_name = exif_entry_to_ivar(entry);
|
268
267
|
value = exif_entry_to_rb_value(entry);
|
268
|
+
|
269
|
+
if (ivar_name == 0x00) {
|
270
|
+
rb_warning("Unsupported tag %x", entry->tag);
|
271
|
+
return;
|
272
|
+
}
|
273
|
+
|
269
274
|
rb_hash_aset(rb_hash_aref(rb_iv_get(*(VALUE *)self_ptr, "@ifds"),
|
270
275
|
ID2SYM(rb_intern(
|
271
276
|
ifd_name_mapping[exif_entry_get_ifd(entry)]))),
|
@@ -296,10 +301,8 @@ static void each_entry(ExifEntry *entry, void *self_ptr) {
|
|
296
301
|
static VALUE exif_entry_to_rb_value(ExifEntry *entry) {
|
297
302
|
ExifData *data;
|
298
303
|
ExifByteOrder order;
|
299
|
-
ExifRational rational;
|
300
|
-
ExifSRational srational;
|
301
304
|
VALUE ret;
|
302
|
-
size_t
|
305
|
+
size_t i;
|
303
306
|
unsigned char size;
|
304
307
|
|
305
308
|
data = entry->parent->parent;
|
data/ext/exif/exif.c
CHANGED
@@ -1,12 +1,14 @@
|
|
1
1
|
#include "data.h"
|
2
2
|
#include "ruby.h"
|
3
3
|
|
4
|
-
VALUE rb_mExif, rb_eError, rb_eNotReadable, rb_eIFDNotFound,
|
4
|
+
VALUE rb_mExif, rb_eError, rb_eNotReadable, rb_eIFDNotFound,
|
5
|
+
rb_eUnknownDataType;
|
5
6
|
|
6
7
|
VALUE rb_exif_const_missing(VALUE klass, VALUE name) {
|
7
8
|
const char not_readble[] = "NotReadble";
|
8
|
-
if(strcmp(rb_id2name(SYM2ID(name)), not_readble) == 0) {
|
9
|
-
rb_warn("constant NotReadble is deprecated and will be removed in the
|
9
|
+
if (strcmp(rb_id2name(SYM2ID(name)), not_readble) == 0) {
|
10
|
+
rb_warn("constant NotReadble is deprecated and will be removed in the "
|
11
|
+
"future, use NotReadable instead.");
|
10
12
|
return rb_eNotReadable;
|
11
13
|
}
|
12
14
|
return rb_call_super(1, &name);
|
@@ -20,6 +22,7 @@ void Init_exif(void) {
|
|
20
22
|
rb_eIFDNotFound = rb_define_class_under(rb_mExif, "IFDNotFound", rb_eError);
|
21
23
|
rb_eUnknownDataType =
|
22
24
|
rb_define_class_under(rb_mExif, "UnknownDataType", rb_eError);
|
23
|
-
rb_define_singleton_method(rb_mExif, "const_missing", rb_exif_const_missing,
|
25
|
+
rb_define_singleton_method(rb_mExif, "const_missing", rb_exif_const_missing,
|
26
|
+
1);
|
24
27
|
init_data();
|
25
28
|
}
|
data/lib/exif/version.rb
CHANGED
metadata
CHANGED
@@ -1,43 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: exif
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jian Weihang
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-06-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: bundler
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: 1.15.4
|
20
|
-
type: :development
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - "~>"
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: 1.15.4
|
27
13
|
- !ruby/object:Gem::Dependency
|
28
14
|
name: rake
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|
30
16
|
requirements:
|
31
|
-
- - "
|
17
|
+
- - ">="
|
32
18
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
19
|
+
version: 0.8.1
|
34
20
|
type: :development
|
35
21
|
prerelease: false
|
36
22
|
version_requirements: !ruby/object:Gem::Requirement
|
37
23
|
requirements:
|
38
|
-
- - "
|
24
|
+
- - ">="
|
39
25
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
26
|
+
version: 0.8.1
|
41
27
|
- !ruby/object:Gem::Dependency
|
42
28
|
name: rake-compiler
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -58,14 +44,14 @@ dependencies:
|
|
58
44
|
requirements:
|
59
45
|
- - "~>"
|
60
46
|
- !ruby/object:Gem::Version
|
61
|
-
version: 5.
|
47
|
+
version: 5.11.3
|
62
48
|
type: :development
|
63
49
|
prerelease: false
|
64
50
|
version_requirements: !ruby/object:Gem::Requirement
|
65
51
|
requirements:
|
66
52
|
- - "~>"
|
67
53
|
- !ruby/object:Gem::Version
|
68
|
-
version: 5.
|
54
|
+
version: 5.11.3
|
69
55
|
description: Ruby EXIF reader written in C extension.
|
70
56
|
email: tonytonyjan@gmail.com
|
71
57
|
executables: []
|
@@ -84,7 +70,7 @@ homepage: https://github.com/tonytonyjan/exif
|
|
84
70
|
licenses:
|
85
71
|
- MIT
|
86
72
|
metadata: {}
|
87
|
-
post_install_message:
|
73
|
+
post_install_message:
|
88
74
|
rdoc_options: []
|
89
75
|
require_paths:
|
90
76
|
- lib
|
@@ -99,9 +85,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
99
85
|
- !ruby/object:Gem::Version
|
100
86
|
version: '0'
|
101
87
|
requirements: []
|
102
|
-
|
103
|
-
|
104
|
-
signing_key:
|
88
|
+
rubygems_version: 3.2.15
|
89
|
+
signing_key:
|
105
90
|
specification_version: 4
|
106
91
|
summary: Ruby EXIF reader written in C extension.
|
107
92
|
test_files: []
|