Board index » cppbuilder » Fast image scaling?
![]() CBuilder Developer |
Fast image scaling?2004-05-24 06:41:22 AM cppbuilder111 Hi, I have been working on an extensive image workflow application for more than 3 years now. It has been running in a photolab for two years and it is processing more and more images every day. I can tell you: it's a great feeling running this hobby project in a professional environment! Even after years of programming experience I still consider myself a newbie. I love it but I am not good at it (trust me). So what is this mail about? The problem with my project is that image scaling (reducing/enlarging) is not fast enough. To give you an impression, I estimate that Adobe Photoshop is 40% faster on the same hardware. I currently use scaling based on code by Dale Schumacher (Graphic Gems???). Did quite some work on the code to allow scaling any number of color channels, 8 and 16bit, any size, any factor etc. etc. Did a lot of testing to optimize the code the best I could. Alas scaling is using float, and a lot of loops. Also, the images the software processes are between 10Mb and 2Gb. To allow working with such images I created my own internal format (reinvented the wheel i guess, but except for scaling all image handling is FAST!). My internal format reads, scales and writes the huge images in chunks, so memory is not an issue (no virtual memory trouble). My question.... Is there anybody out there who can point me to sample code for high quality and FAST scaling? I can find a lot of stuff on the web, but it is all for VGA screenmodes (real time, low quality), or DLL's relying on DIB's etc. All usable sourcecode I found clearly originated from Dale's same code (often not giving him any credit though ;-). Do I need to change to ASM to speed it up? (I hope not as I am not able to adapt it to my needs). Anybody with advice on how to speed up loops, improve / replace float calculations while preserving quality? Any ideas, help, links are highly appreciated! Thanx, Andr? |