Re: Shrinking bitmaps
- Posted by Graeme <graemeburke at hotmail.com> Feb 04, 2002
- 549 views
At 04:25 AM 2/4/02 +1300, you wrote: > >Graeme, > >I do not want to get into another stupid argument across the Tasman, rugby >and cricket fanatics generate enough of them already, but have done any >tests to support your claims? Umm... yes. I used the test demo you posted a few days ago that uses the 640x480 windows setup bitmap. i put each resize routine in a 200 iter loop. first i got them to do 660x660, then 1280x960. Both times my routine was twice as fast. Then i tried 6400x4800 Your routine caused an out of memory error. Mine worked fine > >I just did a quick speed test expanding a 64x64 bitmap to twice its size, >and my *unoptimized* routine seems to be almost 4 times faster than yours. Was it? I'll remember that next time I'm resizing a postage stamp. >I have not attempted any measurements regarding memory usage, but casual >inspection reveals that there should be no significant difference between >the two offerings. The thing that has escaped your casual inspection is the way the return bitmap is built. Your routine uses a sequence the size of the target bitmap. My routine expands the bitmap in the x-axis, then builds the return sequence by making multiple pointers to the first level elements of the x-expanded bitmap. This is why my routine is faster and uses less memory. Pity bout the cricket though ...... :( > >jiri > graeme