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 » U++ Library support » Draw, Display, Images, Bitmaps, Icons » How to efficiently update a large Image?
Re: How to efficiently update a large Image? [message #22581 is a reply to message #22570] Tue, 28 July 2009 11:16 Go to previous messageGo to previous message
Tom1
Messages: 1303
Registered: March 2007
Ultimate Contributor
Hi Mirek,

Thanks for the analysis. The SetSurface note was especially helpful. Namely, it appears to use the same GDI function I used in my own graphics library and therefore it should give the performance I need.

I noticed the SetSurface(Draw& w, ..) in Image.h should probably be updated to SetSurface(SystemDraw& w,.. ) to work.

--

The SetSurface() also appears to be the far most efficient way to put ImageBuffers (e.g. the ones created with Painter) on screen.

That in mind, may I suggest adding a version of SetSurface that uses a source rectangle within the image buffer and a target rectangle for the control, and can therefore optimally update a smaller area of a Control.

Something like:

SetSurface(SystemDraw& w, Rect src, Rect target, Size sz, RGBA *pixelbuffer)

This would further boost the Painter when used on screen as the ImageBuffer would need to be updated only when the content changes and the Paint routine would update the screen using the current buffer contents and only update the areas required by Paint.

Thanks for your help Mirek,

Tom
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Color menu choice
Next Topic: Support for 2bpp tiff images
Goto Forum:
  


Current Time: Tue May 13 08:24:07 CEST 2025

Total time taken to generate the page: 0.02952 seconds