Subj : Re: How to read a pixel from a DIB? To : borland.public.cpp.borlandcpp From : Sebastian Ledesma Date : Wed Oct 20 2004 05:23 pm Bruce: Thanks again for the info. I dont want to create a TMemoryDC, also I'm using TDibs and no TBitmaps, if I use TDC / TMemoryDC i should convert my TDib into a TBitmap. I'm trying with dealing directly with the TDib by using TDib::XOffset and TDib::YOffset (or more convenient) TDib::PixelPtr(x,y) but the interpretation of the data is a bit confusing. Also, I tried TDib::FlippedY(yCoordinate) but something still is missing. Regards Sebastian " Bruce Salzman" escribió en el mensaje news:4176868b$1@newsgroups.borland.com... > > > > That's the way I will use, only lazzines before coding. I have to > > convert > > X,Y coordinates into a linear coordinate (hey that's so hard!!! > > :-) ), also > > what about for non 24 bits bitmaps. In 16 bits bitmaps I will have > > RGB in 5 > > bits, in 8 bits I will have a palette index, and in 4 bits (old 16 > > colored > > bitmaps) something similar. > > > > That's why using GetPixel() is the easiest way. It will return the > pixel color no matter what format the DIB is in. > > Regards, > Bruce > > .