exif 0.11.1 → 0.11.2
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/exif/data.c +7 -7
- data/ext/exif/data.h +1 -1
- data/lib/exif/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9b5adb96e8b7db6ff48610dca63998d0d4401549
|
4
|
+
data.tar.gz: 1d4a1699e0bfe49b4c774e3b49574ea24f23517d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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