exifr 0.10.1 → 0.10.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.
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ EXIF Reader 0.10.2
2
+ * bug fix (thanks to Alexander Staubo for providing me witb sample data);
3
+ don't fail on out-of-range IFD offsets for Apple Aperture generated JPGs
4
+
1
5
  EXIF Reader 0.10.1
2
6
  * old style exif access
3
7
 
data/Rakefile CHANGED
@@ -8,7 +8,7 @@ task :default => :test
8
8
 
9
9
  spec = Gem::Specification.new do |s|
10
10
  s.name = 'exifr'
11
- s.version = '0.10.1'
11
+ s.version = '0.10.2'
12
12
  s.author = "R.W. van 't Veer"
13
13
  s.email = 'remco@remvee.net'
14
14
  s.homepage = 'http://exifr.rubyforge.org/'
@@ -381,7 +381,7 @@ module EXIFR
381
381
  end
382
382
 
383
383
  def next
384
- IFD.new(@data, @offset_next) unless @offset_next == 0
384
+ IFD.new(@data, @offset_next) unless @offset_next == 0 || @offset_next >= @data.size
385
385
  end
386
386
 
387
387
  private
@@ -60,12 +60,17 @@ class TestTIFF < Test::Unit::TestCase
60
60
  end
61
61
 
62
62
  def test_orientation
63
+ tested = 0 # count tests because not all exif samples have an orientation field
63
64
  all_test_exifs.each do |fname|
64
65
  orientation = TIFF.new(fname).orientation
65
- assert_kind_of Module, orientation
66
- assert orientation.respond_to?(:to_i)
67
- assert orientation.respond_to?(:transform_rmagick)
66
+ if orientation
67
+ assert_kind_of Module, orientation
68
+ assert orientation.respond_to?(:to_i)
69
+ assert orientation.respond_to?(:transform_rmagick)
70
+ tested += 1
71
+ end
68
72
  end
73
+ assert tested > 0
69
74
  end
70
75
 
71
76
  def test_gps
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.2
3
3
  specification_version: 1
4
4
  name: exifr
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.10.1
7
- date: 2007-04-26 00:00:00 +02:00
6
+ version: 0.10.2
7
+ date: 2007-05-01 00:00:00 +02:00
8
8
  summary: EXIF Reader is a module to read EXIF from JPEG images.
9
9
  require_paths:
10
10
  - lib
@@ -39,6 +39,7 @@ files:
39
39
  - tests/test_jpeg.rb
40
40
  - tests/test_tiff.rb
41
41
  - tests/data/1x1.jpg
42
+ - tests/data/apple-aperture-1.5.exif
42
43
  - tests/data/canon-g3.exif
43
44
  - tests/data/Canon_PowerShot_A85.exif
44
45
  - tests/data/Casio-EX-S20.exif