iptc 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -72,12 +72,15 @@ module IPTC
72
72
  # this one is much up to date.
73
73
 
74
74
  while @content.pos < @content.length - 1
75
- l @content.pos
76
- l @content.length
77
75
 
78
76
  eight_bim = read(LONG)
79
- l eight_bim
80
- raise "Not a 8BIM packet(#{eight_bim.inspect} #{read(10)}" if eight_bim != "8BIM"
77
+ # Not a 8BIM packet. Go away !
78
+
79
+ if eight_bim != "8BIM"
80
+ l "At #{@content.pos}/#{@content.length} we were unable to find an 8BIM marker (#{eight_bim})."
81
+ return
82
+ end
83
+
81
84
  @bim_type = word()
82
85
 
83
86
  # Read name length and normalize to even number of bytes
@@ -111,7 +114,7 @@ module IPTC
111
114
  size = content.read(2)
112
115
  value = content.read(size.unpack('n')[0])
113
116
 
114
- l "Found marker #{type}"
117
+ l "Found marker 0x#{type.to_s(16)}"
115
118
  marker = IPTC::Marker.new(type, value)
116
119
  @values[@prefix+"/"+IPTC::MarkerNomenclature.markers(type.to_i).name] ||= []
117
120
  @values[@prefix+"/"+IPTC::MarkerNomenclature.markers(type.to_i).name] << value
@@ -1,3 +1,3 @@
1
1
  module IPTC
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iptc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2013-02-27 00:00:00.000000000 Z
14
+ date: 2013-02-28 00:00:00.000000000 Z
15
15
  dependencies: []
16
16
  description: Original code from http://raa.ruby-lang.org/project/jpeg-jfif-iptc/,
17
17
  gemified and updated by Jens Kraemer, Futher fixes by Pierre Baillet