Menu

#11 ilGetPixel

open
nobody
None
5
2006-07-19
2006-07-19
No

Hi, it would be very nice if DevIL would have some sort
of way to access the pixel of the current image.
Something like...

ilGetPixel(x,y);

Which would get the current pixel at location X and Y.
The problem is, how would you deal with all the types
(byte, short. int. float, double) and formats
(RGB,RGBA,BGR,BGRA,Luminace)?

I suppose you could have a different function for all
permutations of types and formats, maybe there is a
better way?

the permutation doesn't seem a great idea. too many
functions, and each one mut be ready to convert the
pixel from the source format to his format. A function
with a pointer should be enough, and the user must be
aware of how much bytes a pixel is.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.