A function there returns a bitmap and I need some help to use that bitmap. The function renders some graphics into a bitmap and I think it must be converetd to CGImage or NSImage before I can display it.

if its just the color being off my first guess would be BGR<>RGB byte order, so maybe try the other version of #kCGBitmapByteOrderDefaultAlso you're specifying "#kCGImageAlphaNone" yet with depth 32 that does have alpha channel, so im guessing you dont want that flag.";why 4?" - 4 bytes for RGBA (so, if ImageDepth(img) = 32 ... use 3 for depth 24)";why 8, 32, *4?" - 8 bits per R/G/B component, 32 bits per total pixel (32 for RGBA, 24 for RGB), and *4 as there's 4 components (R G B A)

_________________Thankyou to all the coders who generously helped & encouraged me in the nearly 2yrs when i was welcome here,it was a tremendous privilege. I learned a lot. I wish you and your families all the best and success for the future.

if its just the color being off my first guess would be BGR<>RGB byte order, so maybe try the other version of #kCGBitmapByteOrderDefaultAlso you're specifying "#kCGImageAlphaNone" yet with depth 32 that does have alpha channel, so im guessing you dont want that flag.";why 4?" - 4 bytes for RGBA (so, if ImageDepth(img) = 32 ... use 3 for depth 24)";why 8, 32, *4?" - 8 bits per R/G/B component, 32 bits per total pixel (32 for RGBA, 24 for RGB), and *4 as there's 4 components (R G B A)

Thanks for the explanation Keya. But after trying many combinations the image either does not display or is displayed with wrong colors or wrong sizes (always in height).