exif 0.11.1 → 0.11.2

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
2
  SHA1:
3
- metadata.gz: 253aac5b06eae6b031fd65e87af11e630688b78d
4
- data.tar.gz: af7e21c2f92fa418e59bb4d9216b6ae6910d3e4b
3
+ metadata.gz: 9b5adb96e8b7db6ff48610dca63998d0d4401549
4
+ data.tar.gz: 1d4a1699e0bfe49b4c774e3b49574ea24f23517d
5
5
  SHA512:
6
- metadata.gz: f1f142637d719b20553cd4aaf783e7bbd503663511f97cf0723eb57b8c273a3f659917dd9b0571fb5791b81c87f892e93a3b52ceb84bf3e8fcd3abba6718ffd5
7
- data.tar.gz: 338760a80d839db047a4d3099c08529bad89d099d113fd9a3576bffa183a618738c411c18b03daecb7cbf3a6845df8ee6f395110c7334584b42e2964e12e40f3
6
+ metadata.gz: a0b018a1378116895e7213bd537a3a1cad8fa3ad7c8fe46ddd4df9aaafeda2ef48c198d7b5ac1169784f59a826a244bf826265dceed4a9428a43d9c5263006d8
7
+ data.tar.gz: b650457ffb0df660cfc16e84acdcd43c5f4dc9c2c618487227f4a3e40246b47e459dd65d038af4ee12042d0aa32c33c7b58ab465f4f07afb61863ecd25cc0b22
data/ext/exif/data.c CHANGED
@@ -94,14 +94,14 @@ static void each_entry(ExifEntry *ee, void *self_ptr){
94
94
  value = rb_float_new(atof(buf));
95
95
  break;
96
96
  default:
97
- value = process_value(self, ee->tag, buf);
97
+ value = process_value(self, ifd, ee->tag, buf);
98
98
  }
99
99
  rb_hash_aset(rb_hash_aref(rb_contents, IFD2SYM[ifd]), tag_name, value);
100
100
  rb_hash_aset(rb_contents, tag_name, value);
101
101
  rb_iv_set(*self, attr_name, value);
102
102
  }
103
103
 
104
- static VALUE process_value(VALUE *self_ptr, ExifTag tag, char *buf){
104
+ static VALUE process_value(VALUE *self_ptr, ExifIfd ifd, ExifTag tag, char *buf){
105
105
  ExifData *ed;
106
106
  Data_Get_Struct(*self_ptr, ExifData, ed);
107
107
  switch((int)tag){
@@ -121,9 +121,10 @@ static VALUE process_value(VALUE *self_ptr, ExifTag tag, char *buf){
121
121
  return rb_time_new(mktime(&timer), 0);
122
122
  break;
123
123
  }
124
- case EXIF_TAG_GPS_LATITUDE:
125
- case EXIF_TAG_GPS_LONGITUDE:
124
+ case EXIF_TAG_GPS_LATITUDE: // EXIF_TAG_INTEROPERABILITY_INDEX
125
+ case EXIF_TAG_GPS_LONGITUDE: // EXIF_TAG_INTEROPERABILITY_VERSION
126
126
  {
127
+ if(ifd != EXIF_IFD_GPS) break;
127
128
  char *l = buf, *r = buf + 1;
128
129
  double degrees, minutes, seconds;
129
130
  // "121, 30.7476, 0"
@@ -140,10 +141,9 @@ static VALUE process_value(VALUE *self_ptr, ExifTag tag, char *buf){
140
141
  double degree = (degrees * 3600 + minutes * 60 + seconds) / 3600;
141
142
  if(ref_value == 'S' || ref_value == 'W') degree *= -1;
142
143
  return rb_float_new(degree);
144
+ }
143
145
  }
144
- default:
145
- return rb_str_new_cstr(buf);
146
- }
146
+ return rb_str_new_cstr(buf);
147
147
  }
148
148
 
149
149
  static char* attr_string(ExifIfd ifd, ExifTag tag){
data/ext/exif/data.h CHANGED
@@ -14,7 +14,7 @@ static VALUE rb_value(VALUE self, VALUE key);
14
14
 
15
15
  static void each_content(ExifContent *ec, void *user_data);
16
16
  static void each_entry(ExifEntry *, void *user_data);
17
- static VALUE process_value(VALUE *self_ptr, ExifTag tag, char *buf);
17
+ static VALUE process_value(VALUE *self_ptr, ExifIfd ifd, ExifTag tag, char *buf);
18
18
  static char* attr_string(ExifIfd ifd, ExifTag tag);
19
19
 
20
20
  #endif /* DATA_H */
data/lib/exif/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Exif
2
- VERSION = "0.11.1"
2
+ VERSION = "0.11.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: exif
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.1
4
+ version: 0.11.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jian Weihang