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 #22564 is a reply to message #22563] Mon, 27 July 2009 13:39 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14257
Registered: November 2005
Ultimate Member
Tom1 wrote on Mon, 27 July 2009 06:24

Hi,

I need to frequently update a small amount of pixels in a relatively large image (e.g. 1920x1200) and then draw the parts of image on screen. Unfortunately the following code is too slow:
ImageBuffer ib(image);
// .. here's the manipulation of the ib
image=ib;


Help, anybody?




The question is why it is slow...

The first thing to try is

ib.SetKind(....)

(I guess it will be ib.SetKind(IMAGE_OPAQUE)).

this would prevent optimization scan.

Just for better undestanding, what is slow here? Are we speaking about milliseconds or second?

Quote:


(I used to have my own graphics layer implemented for GDI and X11 but they just badly broke down due to the recent Draw virtualization.)

// Tom


In most cases, dynamic_cast<SystemDraw *> makes original code work just fine (SystemDraw has all interface and attributes of former Draw).

Mirek
 
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 11:38:05 CEST 2025

Total time taken to generate the page: 0.03812 seconds