fastimage 1.5.4 → 1.5.5
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 +11 -2
- data/test/test.rb +1 -0
- metadata +31 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c63f6d99fe0d72ebc82cc5e9f6af7de6d6fef324
|
4
|
+
data.tar.gz: 572d3036b3af69025a484a9b446c6d6821d5979e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e81707dfb27fd2fe650f497fcf0f9143a37cd15ad824471c897819167fe2b7c0f0ac21cddef4caec899b096a7e052734d0e0eca4a03e49e44fa715092c6cee34
|
7
|
+
data.tar.gz: b7b3d2d371f15adc282d538ffa61ed199256fe45dcd90764fac603f0cbe3c3de45d69a066d7eff5608e62b8bd233e38fbefd5a96adbd63ec77429a3130bff042
|
data/lib/fastimage.rb
CHANGED
@@ -413,8 +413,17 @@ class FastImage
|
|
413
413
|
end
|
414
414
|
|
415
415
|
def parse_size_for_bmp
|
416
|
-
d = get_chars(
|
417
|
-
d.unpack("C")[0]
|
416
|
+
d = get_chars(32)[14..28]
|
417
|
+
header = d.unpack("C")[0]
|
418
|
+
|
419
|
+
result = if header == 40
|
420
|
+
d[4..-1].unpack('l<l<')
|
421
|
+
else
|
422
|
+
d[4..8].unpack('SS')
|
423
|
+
end
|
424
|
+
|
425
|
+
# ImageHeight is expressed in pixels. The absolute value is necessary because ImageHeight can be negative
|
426
|
+
[result.first, result.last.abs]
|
418
427
|
end
|
419
428
|
|
420
429
|
def get_exif_byte_order
|
data/test/test.rb
CHANGED
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.5
|
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-12-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -44,6 +44,34 @@ dependencies:
|
|
44
44
|
- - ~>
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: '1.3'
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: rake
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - '>='
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '0'
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: rdoc
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - '>='
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '0'
|
68
|
+
type: :development
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - '>='
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '0'
|
47
75
|
description: FastImage finds the size or type of an image given its uri by fetching
|
48
76
|
as little as needed.
|
49
77
|
email: sdsykes@gmail.com
|
@@ -91,7 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
91
119
|
version: '0'
|
92
120
|
requirements: []
|
93
121
|
rubyforge_project:
|
94
|
-
rubygems_version: 2.0.
|
122
|
+
rubygems_version: 2.0.3
|
95
123
|
signing_key:
|
96
124
|
specification_version: 4
|
97
125
|
summary: FastImage - Image info fast
|