Home » Community » Newbie corner » Displaying raw image data
Re: Displaying raw image data [message #39783 is a reply to message #39778] |
Fri, 26 April 2013 13:31   |
|
keltor wrote on Fri, 26 April 2013 08:37 | Image expects a RGBA*, while I have an unsigned char*. Force-casting does not work (naturally), the image just displays some garbage.
| Casting should work, I do it quite often The only restriction that your library must return data in same order as they are sorted in RGBA, that is {B,G,R,A} if I remember it correctly. Otherwise the color channels would be switched, which might result in garbled data as you describe.
Anyway, I'm glad to hear you found a working solution 
Honza
|
|
|
Goto Forum:
Current Time: Sun Aug 24 14:12:45 CEST 2025
Total time taken to generate the page: 0.06681 seconds
|