[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Imlib and image computing



Well, 

I use Imlib from RH5.2 (which means 1.8.1, gtk+ 1.1.2).

[I would like first to report troubles to compile the sample
programs given in the Imlib tutorial since they don't
give good command line includes and libs (I solved
this trouble by using imlib-config --foo).]

As a second trouble, it seems weird to me that any image
is stored with 24bpp in the memory, even if it's black and white
or grayscale; and I access for example to the pixels in a
grayscale image by looping on:

    i+=3;
    tot+=256-im->rgb_data[i];

which is a bit barbaric.

So, I wanted to know if you can tell me what's the preferred
way to store images in the memory, 
1/ for X
2/ destined to make heavy computation on it, requiring maybe a
smarter structures to speed up.

in short, for example, how is the gimp true rotation (not 90-180-270
angles!) programmed? (think of a 2-color image rotation: hope
it does not keep the 24bits)    

--
Emmanuel Michon (http://www.enst.fr/~michon)
``Thou shalt check the array bounds of all strings (indeed, all arrays), 
  for surely where thou typest "foo" someone someday shall type
  "supercalifragilisticexpialidocious".'' 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]