From 8f9a740367e97a724a96e85bd9902612cef330ae Mon Sep 17 00:00:00 2001 From: Forrest Ye Date: Wed, 4 Mar 2015 15:21:32 +0800 Subject: [PATCH] clean up whitespace --- lib/fastimage.rb | 12 ++++++------ lib/fastimage/fbr.rb | 1 - 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/lib/fastimage.rb b/lib/fastimage.rb index 6db01de..f6183f7 100644 --- a/lib/fastimage.rb +++ b/lib/fastimage.rb @@ -250,7 +250,7 @@ class FastImage end end end - + parse_packets FiberStream.new(read_fiber) break # needed to actively quit out of the fetch @@ -404,7 +404,7 @@ class FastImage :webp else raise UnknownImageType - end + end else raise UnknownImageType end @@ -493,18 +493,18 @@ class FastImage nil end end - + def parse_size_vp8 w, h = @stream.read(10).unpack("@6vv") [w & 0x3fff, h & 0x3fff] end - + def parse_size_vp8l @stream.read(1) # 0x2f b1, b2, b3, b4 = @stream.read(4).bytes.to_a [1 + (((b2 & 0x3f) << 8) | b1), 1 + (((b4 & 0xF) << 10) | (b3 << 2) | ((b2 & 0xC0) >> 6))] end - + def parse_size_vp8x flags = @stream.read(4).unpack("C")[0] b1, b2, b3, b4, b5, b6 = @stream.read(6).unpack("CCCCCC") @@ -514,7 +514,7 @@ class FastImage # parse exif for orientation # TODO: find or create test images for this end - + return [width, height] end diff --git a/lib/fastimage/fbr.rb b/lib/fastimage/fbr.rb index cbb0efc..12d5673 100644 --- a/lib/fastimage/fbr.rb +++ b/lib/fastimage/fbr.rb @@ -64,4 +64,3 @@ unless defined? Fiber end end end -