From: jeljer te Wies Date: 2009-03-23T07:53:56+09:00 Subject: Re: convert PNG to hex Ben Bleything wrote: > On Sun, Mar 22, 2009 at 3:43 PM, jeljer te Wies wrote: >> This is what i now tried (image is ofcourse a array so I did 2 just to >> test it) but >> it's not working :( > > Of course it's not. The image appears as an array when you view it as > an image, but it's encoded and compressed inside the PNG. > > You'll need to find or craft a library that can decode the PNG format > (many exist; googling should help you here) and use it to then read > each pixel from the image. > > Ben Ah thanxs ! ...I didn't know that !.. I just googled on : "convert png to hex with ruby" "convert image to hex with ruby" "who to get each pixel from a png with ruby" etc. etc. what didn't give me an answer -- Posted via http://www.ruby-forum.com/.