Home » U++ Library support » Draw, Display, Images, Bitmaps, Icons » How to efficiently update a large Image?
Re: How to efficiently update a large Image? [message #22569 is a reply to message #22566] |
Mon, 27 July 2009 17:15   |
 |
mirek
Messages: 14257 Registered: November 2005
|
Ultimate Member |
|
|
Tom1 wrote on Mon, 27 July 2009 10:47 | Hi Mirek,
SetKind(IMAGE_OPAQUE) gives marginal improvement.
Now I see the visit from Image to ImageBuffer and back to Image does not take more than about 1.5 ms. However, after this visit the DrawImage does something more than usual and becomes slow. It takes about 30 ms to update a small stripe of an image using DrawImage whereas without the ImageBuffer visit, this takes less than a millisecond.
|
It is because the raster needs to be converted to windows object (HBMP) that then can be painted on the screen.
That said, Image is really optimized for thousands of small images, not single big one...
That said (2), there is SetSurface function (which is sort of semi-public), maybe it can be helpful somehow in this case.
Another option is to divide the big image into many smaller ones.
Quote: |
I also noticed that the application allocates and deallocates several megabytes worth of memory when running probably because of what is happening around this image or imagebuffer.
|
Most like HBMP associated data.
Quote: |
Is there any way to directly update the Image pixel contents without ImageBuffer and the associated DrawImage overhead?
|
No, but I believe it should not really be a problem. Image->ImageBuffer->Image is extremely fast. The problem is that it is necessarry to move those pixels to GDI afterwards.
Mirek
|
|
|
 |
|
How to efficiently update a large Image?
By: Tom1 on Mon, 27 July 2009 12:24
|
 |
|
Re: How to efficiently update a large Image?
By: mirek on Mon, 27 July 2009 13:39
|
 |
|
Re: How to efficiently update a large Image?
By: Tom1 on Mon, 27 July 2009 16:47
|
 |
|
Re: How to efficiently update a large Image?
By: mirek on Mon, 27 July 2009 17:15
|
 |
|
Re: How to efficiently update a large Image?
By: mirek on Mon, 27 July 2009 17:18
|
 |
|
Re: How to efficiently update a large Image?
By: Tom1 on Tue, 28 July 2009 11:16
|
 |
|
Re: How to efficiently update a large Image?
By: mirek on Tue, 28 July 2009 16:29
|
 |
|
Re: How to efficiently update a large Image?
By: mirek on Tue, 28 July 2009 16:32
|
 |
|
Re: How to efficiently update a large Image?
By: Tom1 on Wed, 29 July 2009 09:18
|
 |
|
Re: How to efficiently update a large Image?
By: mirek on Sun, 02 August 2009 15:11
|
 |
|
Re: How to efficiently update a large Image?
By: Tom1 on Wed, 26 August 2009 07:57
|
 |
|
Re: How to efficiently update a large Image?
By: mirek on Fri, 28 August 2009 00:24
|
 |
|
Re: How to efficiently update a large Image?
By: Tom1 on Tue, 01 September 2009 08:24
|
 |
|
Re: How to efficiently update a large Image?
By: mirek on Wed, 02 September 2009 11:37
|
 |
|
Re: How to efficiently update a large Image?
By: Tom1 on Thu, 03 September 2009 11:45
|
Goto Forum:
Current Time: Tue May 13 11:22:37 CEST 2025
Total time taken to generate the page: 0.00862 seconds
|