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 » Optimized storage of 1BPP images
Re: Optimized storage of 1BPP images [message #14034 is a reply to message #14033] Thu, 07 February 2008 13:47 Go to previous messageGo to previous message
cbpporter is currently offline  cbpporter
Messages: 1401
Registered: September 2007
Ultimate Contributor
mdelfede wrote on Thu, 07 February 2008 14:30


1- As explained here :

http://www.ultimatepp.org/forum/index.php?t=msg&th=3131& amp; amp;start=0&

the image is rescaled on the fly zooming, panning and/or resizing the widget. The performance is not bad at all, but being the image very big the user feels like the scroll is a bit coarse.


I had a similar problem with my image scrolling control. Performance was reasonablly good, but when scrolling, it felt like some weight was holding you back and it felt plain wrong to use.

I fixed this by creating a permanent preallocated image, the size of the screen, and using it as a back buffer. When zooming for example, you only draw a zone zoomed on the backbuffer, and simply draw a portion as large as the parent control from the backbuffer. Not having to create Image objects on each redraw gives great performance boost. I don't know if this applies to you needs.

About number 2, I don't really know. U++ Images are in RGBA format, and it would be quite some effort to add support for other formats too. With WinAPI (if under win), you could easily put together a 1 bit bitmap, and on Paint, get the HDC and blit it, but of course this is not platform independent. Under X I think that working with image buffers is a little more natural, but I have no details.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: High Performance Drawing
Next Topic: Draw stuff [SOLVED]
Goto Forum:
  


Current Time: Wed May 08 16:49:02 CEST 2024

Total time taken to generate the page: 0.02417 seconds