views:

2086

answers:

3
+1  A: 

There are several solutions here and here

Curt Sampson
+2  A: 

Long problem, short answer: I was missing the binary mode for reading the image under Windows.

f = File.new(filename, File::RDWR)

had to be

f = File.new(filename, "rb")

Patrick Daryll Glandien