fastimage 1.2.7 → 1.2.8

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  ---
2
- :patch: 6
2
+ :patch: 8
3
3
  :major: 1
4
4
  :build:
5
5
  :minor: 2
data/lib/fastimage.rb CHANGED
@@ -257,13 +257,15 @@ class FastImage
257
257
  get_chars(2)
258
258
  :started
259
259
  when :started
260
- get_byte == 0xFF ? :sof : :started
260
+ get_byte == 0xFF ? :sof : :started
261
261
  when :sof
262
262
  c = get_byte
263
263
  if (0xe0..0xef).include?(c)
264
264
  :skipframe
265
265
  elsif [0xC0..0xC3, 0xC5..0xC7, 0xC9..0xCB, 0xCD..0xCF].detect {|r| r.include? c}
266
266
  :readsize
267
+ elsif c == 0xFF
268
+ :sof
267
269
  else
268
270
  :skipframe
269
271
  end
Binary file
data/test/test.rb CHANGED
@@ -15,7 +15,8 @@ GoodFixtures = {
15
15
  "test.gif"=>[:gif, [17, 32]],
16
16
  "test.jpg"=>[:jpeg, [882, 470]],
17
17
  "test.png"=>[:png, [30, 20]],
18
- "test2.jpg"=>[:jpeg, [250, 188]]
18
+ "test2.jpg"=>[:jpeg, [250, 188]],
19
+ "test3.jpg"=>[:jpeg, [630,367]]
19
20
  }
20
21
 
21
22
  BadFixtures = [
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastimage
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 15
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 2
9
- - 7
10
- version: 1.2.7
9
+ - 8
10
+ version: 1.2.8
11
11
  platform: ruby
12
12
  authors:
13
13
  - Stephen Sykes
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-07-14 00:00:00 +03:00
18
+ date: 2010-11-11 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies: []
21
21
 
@@ -41,6 +41,7 @@ files:
41
41
  - test/fixtures/test.jpg
42
42
  - test/fixtures/test.png
43
43
  - test/fixtures/test2.jpg
44
+ - test/fixtures/test3.jpg
44
45
  - test/test.rb
45
46
  has_rdoc: true
46
47
  homepage: http://github.com/sdsykes/fastimage