Skip to content

Commit

Permalink
bug fix in image.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
Hideo NAKAMURA committed Feb 8, 2013
1 parent 3e92ac7 commit eba862a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/writeexcel/image.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def process_bmp(data) #:nodoc:
def check_verify(data)
# Check that the file is big enough to be a bitmap.
raise "#{@filename} doesn't contain enough data." if data.bytesize <= 0x36
raise "#{@filename}: largest image width #{width} supported is 65k." if @width > 0xFFFF
raise "#{@filename}: largest image width #{@width} supported is 65k." if @width > 0xFFFF
raise "#{@filename}: largest image height supported is 65k." if @height > 0xFFFF

# Read the bitmap planes and bpp data. Verify them.
Expand All @@ -111,7 +111,7 @@ def check_verify(data)
raise "#{@filename}: only 1 plane supported in bitmap image." unless planes == 1

# Read the bitmap compression. Verify compression.
compression = data.unpack("x30 V")
compression = data.unpack("x30 V")[0]
raise "#{@filename}: compression not supported in bitmap image." unless compression == 0
end

Expand Down

0 comments on commit eba862a

Please sign in to comment.