I was confused with CFbsBitmap,and I wondered what are the differences between CFbsBitmap in symbian and DIB(device-independent bitmap) in windows.Does CFbsBitmap also include BitmapfileHeader,Palette,and Image data?
CFbsBitmap has very little in common with DIBs, and the .bmp format (exept they are both used to store image bitmaps)
It is simply the class used in symbian to handle image bitmaps.
An image bitmap typically has:
1. a size
2. a color format
3. storage for pixels
4. optionally extra information like palettes
In windows, they have the DIB object wich contain all this information (with great detail to be device independent)
In symbian, bitmap information are contained in CFbsBitmap objects, and the pixels of it are kept on a special heap, kept by the Font & Bitmap Server.
You can get the color format of the bitmap by calling DisplayMode(), and you can get raw access to the pixel storage by first calling LockHeap() and then get the address to the pixels with a call to DataAddress().
The pointer returned are the raw pixels, no header or anything. (all that kind of information is kept in the CFbsBitmap class and retrieved through functions like DisplayMode())
For raw access you will also need DataStride() and when you are done, you MUST call UnlockHeap(), or you will hang the system by refusing all processes in the phone access to bitmaps.
Palette bitmaps are seldom used in symbian, but for those, you get palette information again by member function calls to CFbsBitmap.
Hope that helped a little to clear your confusion..
Forum posts: 1232
CFbsBitmap has very little in common with DIBs, and the .bmp format (exept they are both used to store image bitmaps)
It is simply the class used in symbian to handle image bitmaps.
An image bitmap typically has:
1. a size
2. a color format
3. storage for pixels
4. optionally extra information like palettes
In windows, they have the DIB object wich contain all this information (with great detail to be device independent)
In symbian, bitmap information are contained in CFbsBitmap objects, and the pixels of it are kept on a special heap, kept by the Font & Bitmap Server.
You can get the color format of the bitmap by calling DisplayMode(), and you can get raw access to the pixel storage by first calling LockHeap() and then get the address to the pixels with a call to DataAddress().
The pointer returned are the raw pixels, no header or anything. (all that kind of information is kept in the CFbsBitmap class and retrieved through functions like DisplayMode())
For raw access you will also need DataStride() and when you are done, you MUST call UnlockHeap(), or you will hang the system by refusing all processes in the phone access to bitmaps.
Palette bitmaps are seldom used in symbian, but for those, you get palette information again by member function calls to CFbsBitmap.
Hope that helped a little to clear your confusion..