Home » U++ Library support » Draw, Display, Images, Bitmaps, Icons » Optimized storage of 1BPP images
Optimized storage of 1BPP images [message #14033] |
Thu, 07 February 2008 13:30 |
mdelfede
Messages: 1307 Registered: September 2007
|
Ultimate Contributor |
|
|
I made a Tiff viewer control, with thumbnails and contiuous page scolling, in order to view Tiff images that are all 1 bit per pixel ones (black and whte fax).
I tried in 2 ways :
1- As explained here :
http://www.ultimatepp.org/forum/index.php?t=msg&th=3131& 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.
2- The same but caching rescaled images when first displaying them. Of course, I must re-cache them on zooming. That works great, the scroll is very smooth but the cached images get *very* big in memory, with high zoom factors (I must cache the whole image because of pan/scroll requirements). In addition, when the zoom factor is high, there's a noticeable delay when rescaling/buffering the whole image.
As the images are just 1-bit-per-pixel, I think is nonsense to store them in RGBA format; it would be much better to have a packed 1BPP format... that would solve all problems.
Is there an (easy!) way to get image through ImageEncoder that are so packed, and of course a way to draw those packed images
directly on a Draw object ?
Ciao
Max
|
|
|
Goto Forum:
Current Time: Sat Apr 27 08:47:54 CEST 2024
Total time taken to generate the page: 0.06653 seconds
|