Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous messageGo to previous message
dolik.rce is currently offline  dolik.rce
Messages: 1791
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

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 Wink Consider yourself warned Very Happy

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 Wink
Quote:

We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil.


Honza
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: compiling with MSC 10
Next Topic: ScatterCtrl / ScatterDraw - ShowLegend() problem and general Question
Goto Forum:
  


Current Time: Sun Aug 24 11:24:03 CEST 2025

Total time taken to generate the page: 0.04284 seconds