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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 8d658dd771d13abedfe7ab02bfede763a0021132
4
- data.tar.gz: 56327a0dade4446064ffbed2a849836598b891dd
2
+ SHA256:
3
+ metadata.gz: 2c6e39047ca990d8de0501f004d20125f203f3dc709b8c82e63c41af05689169
4
+ data.tar.gz: 2f6328707424b868243624554e3909ac7957a1a1dd6fffdedef4dd98d3a20c77
5
5
  SHA512:
6
- metadata.gz: a1e5a4b2d2826d24dcb5d5e2e59a6f1f4df7a2753ed17526b83c236f164d74139f4037833e55f913a5a3dc77f6e32398c9bdf48893f701647305b36ed22980c2
7
- data.tar.gz: dd5a25648daaa66665ccc0c3ad9b3da78a2f02b1ee2b77c016ad45d082293c61b4df75590f82584722b7806b08add02c98cd8e1aaee13aa9b32dd9d40788645d
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 len, i;
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, rb_eUnknownDataType;
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 future, use NotReadable instead.");
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, 1);
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Exif
4
- VERSION = '2.2.0'
4
+ VERSION = '2.2.1'
5
5
  end
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.0
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: 2017-10-28 00:00:00.000000000 Z
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: 12.0.0
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: 12.0.0
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.10.3
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.10.3
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
- rubyforge_project:
103
- rubygems_version: 2.6.14
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: []