From: Lars Christensen Date: 2008-10-17T18:59:27+09:00 Subject: Re: Help! JPEG marker not found! On Oct 17, 11:32 am, Min jm wrote: > filejpg = File.read("img.jpg") > img = ImageSize.new( filejpg ) > > With some jpg files it works right, but with some of them I get this > message error: JPEG marker not found! > > I've searched on the net and I've seen it's something like the file is > corrupted. What platform are you on? You might need to read the file in binary mode: filejpg = File.open("img.jpg", "rb") {|f| f.read}