Ruby & bitmaps

hello,

I’m working on a script which is using OpenGL.
I have problems to say OpenGL to use a bitmap-file
for textures (because the gl-function need a specific part of
the bitmap-file).

Is there anywhere a library for such things (or a example)?

daniel