jeljer te Wies <jeljer / me.com> writes:


> Here is some sample code i made but doesn't work:
>
> f = File.new("PNG.png")
> image = f.readlines
>
> puts image.to_hex


Without knowing exactly what you want to do... 

1) f.readlines gives an *Array* of strings
2) to_hex doesn't exist in Ruby. You probably want sprintf "%X"