fastimage 1.5.0 → 1.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fastimage.rb +3 -2
- data/test/fixtures/infinite.jpg +0 -0
- data/test/test.rb +2 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3543a9d79c335da93081dd89b99159c51cfa05b9
|
4
|
+
data.tar.gz: 896de6c0e1ba2ec71b952b17e276b395f2d28d11
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 58d0d3c73b5d3d01cb5b6adb9cd86526600c12e2371742fcfd5391587fe3fe7f9f63b389e61ffafc770e11502d27a505122afb635818656d901540d7e32aeb35
|
7
|
+
data.tar.gz: d6ebcdb6272c9c9d56cd6333183ad67d08d994a7d24033ef7e5c42d263a9779c261fdde06db2fa9eb4419fe5b692e3dd8215eb501d22f8191e31c9967b7f2216
|
data/lib/fastimage.rb
CHANGED
@@ -445,8 +445,9 @@ class FastImage
|
|
445
445
|
end
|
446
446
|
|
447
447
|
next_offset = get_chars(4).unpack(@long)[0]
|
448
|
-
|
449
|
-
|
448
|
+
relative_offset = next_offset - (@bytes_delivered - @exif_start_byte)
|
449
|
+
if relative_offset >= 0
|
450
|
+
get_chars(relative_offset)
|
450
451
|
parse_exif_ifd
|
451
452
|
end
|
452
453
|
end
|
Binary file
|
data/test/test.rb
CHANGED
@@ -19,7 +19,8 @@ GoodFixtures = {
|
|
19
19
|
"test3.jpg"=>[:jpeg, [630, 367]],
|
20
20
|
"test.tiff"=>[:tiff, [85, 67]],
|
21
21
|
"test2.tiff"=>[:tiff, [333, 225]],
|
22
|
-
"exif_orientation.jpg"=>[:jpeg, [2448, 3264]]
|
22
|
+
"exif_orientation.jpg"=>[:jpeg, [2448, 3264]],
|
23
|
+
"infinite.jpg"=>[:jpeg, [160,240]]
|
23
24
|
}
|
24
25
|
|
25
26
|
BadFixtures = [
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastimage
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephen Sykes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-09-17 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: FastImage finds the size or type of an image given its uri by fetching
|
14
14
|
as little as needed.
|
@@ -33,6 +33,7 @@ files:
|
|
33
33
|
- test/fixtures/test.tiff
|
34
34
|
- test/fixtures/test2.tiff
|
35
35
|
- test/fixtures/exif_orientation.jpg
|
36
|
+
- test/fixtures/infinite.jpg
|
36
37
|
- test/fixtures/folder with spaces/test.bmp
|
37
38
|
- test/test.rb
|
38
39
|
homepage: http://github.com/sdsykes/fastimage
|