But I think this is not the problem, because it crashes in the first loop and there iX and iY are 0. It even crashs, when I write:
MyBitmap->GetPixel(*aColor, TPoint(5,5));
The error is an untreated exception in epoc.exe (FBSCLI.DLL).
Hi Manu,
I really enjoy to answer your postings...
There's only one line missing in your code:
TBitmapUtil bitmapUtil(yourBitmap);
Yeah!
So you have an handle on your bitmap (previous to your loop). Even if you don't use the methods of this handle, you have to take it.
But maybe we can talk about it by lunch?
I cannot have lunch with you guys, but can you please say a few words in what situations taking handle is necessary? This is very interesting, I didn't care to do it so far, but my bitmap operations are very limited.
Thank you chrishawaii, but what exactly do you mean by "handling" the bitmap? I was able to draw on the bitmap, draw the bitmap, use methods like ScanLineLength, GetScanLine, SetScanLine of the bitmap, and even feed bitmaps to CImageDecoder without getting any handles, although I've heard with handles something might be faster. I didn't try to get separate pixels though.
What devices require getting a handle? I'm using Series 60 Nokias like 6600 and 6630.
She (Manu) tried to use the GetPixel method without having a TBitmapUtil bitmapUtil(CameraBitmap); on her bitmap.
That doesn't work.
You better asked me, why the GetPixel()-method of the class TBitmapUtil doesn't give the right pixel-value, although all other methods work fine. Otherwise this class would be very convenient to use.
I don't know.
hi arne,
why do you prefer this way? what is the advantage in disclaiming pointer?
did you try this way? did you disclaim the handle on the bitmap:
TBitmapUtil bitmapUtil(yourBitmap); ???
That would be interesting. does your way really work?