Home » Community » Newbie corner » Displaying raw image data
Re: Displaying raw image data [message #39746 is a reply to message #39745] |
Tue, 23 April 2013 07:27   |
|
keltor wrote on Tue, 23 April 2013 00:03 | Much obliged, Honza. I will try to create a derived class to override the memory location of the raw data. If that doesn't work, I guess I will be stuck with the memcpy that I was trying to avoid, but no big deal. Thank you for the clear examples!
Kel
|
You're welcome. If you really want to try modifying the U++ classes, you'll probably need to create your own variant of ImageBuffer::Create() that skips the pixels Buffer allocation. Note that you'll probably not be able to use derived classes, Image and ImageBuffer are quite tied together and were not designed with extensibility in mind. So you'll probably have to modify the methods directly in the U++ sources, meaning you'll have to maintain it when new versions come out, which can be quite a burden sometimes Consider yourself warned 
But... Are you sure memcpy is a problem here? It usually takes much less time than generating the image. Don't forget what Donald Knuth said  Quote: | We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil.
|
Honza
|
|
|
Goto Forum:
Current Time: Sun Aug 24 16:47:42 CEST 2025
Total time taken to generate the page: 0.00543 seconds
|