Skip to content

Commit

Permalink
pcx: force reading header by little endian
Browse files Browse the repository at this point in the history
Fixes toy#15 .
  • Loading branch information
mtasaka committed Aug 20, 2021
1 parent 5b3d11a commit cb776c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/image_size.rb
Expand Up @@ -294,7 +294,7 @@ def size_of_tiff(ir)
end

def size_of_pcx(ir)
parts = ir[4, 8].unpack('S4')
parts = ir[4, 8].unpack('v4')
[parts[2] - parts[0] + 1, parts[3] - parts[1] + 1]
end

Expand Down

0 comments on commit cb776c6

Please sign in to comment.