From: Alexandro Kez Date: 2009-12-08T01:38:14+09:00 Subject: Re: Reading Images Oh, no... I really like ruby, but this is just ridiculous such a high level language and no way to deal with such types of data?... Rob Biedenharn wrote: > A jpeg is more complicated that that. (All image formats are actually.) > > Here's http://gist.github.com/89738 some code that can find the width > and height of an image in PNG, GIF, or JPEG format. Notice how much > more complicated the JPEG code is because you have to find the right > JFIF segment and there can be embedded thumbnails and such so a simple > regexp search for the first part that looks like the size won't work. > > You might want to look at ImageMagick (RMagick is the ruby interface) > or some other image library that will find the pixel data for you. > > -Rob > > On Dec 7, 2009, at 11:05 AM, Alexandro Kez wrote: > >> GL.BindTexture(GL::TEXTURE_2D, name[0]); >> >> >> > Rob Biedenharn http://agileconsultingllc.com > Rob@AgileConsultingLLC.com > +1 513-295-4739 > Skype: rob.biedenharn -- Posted via http://www.ruby-forum.com/.