Board index » cppbuilder » Fast image scaling?

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?
 
 

Re:Fast image scaling?

you've probably already seen it but what I usually use is the devIL
library. It's an open source library so you can take a look at their
resizing routines, which I always thought were FAST (maybe they're not,
I didn't use them on 2 gb images). anyhow you can just "borrow" their
routines if they outperform yours, or you integrate the whole library -
it supports writing your own routines for loading and saving, so you
could add support for your custom file format.
that's my best idea. hope it helps.
cheers, klaus
Andr?wrote:
Quote
[...]
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?


 

Re:Fast image scaling?

ps: the url is openil.sourceforge.net
 

{smallsort}

Re:Fast image scaling?

Thanks Klaus, I'll have a close look at it to see if the code is faster
(different at least), and if it can be ported to my own 'lib'.
In the meantime: anyone else with a hint?
TIA, and thanks again Klaus!
Andr?
"Klaus Drobec" < XXXX@XXXXX.COM >schreef in bericht
Quote
ps: the url is openil.sourceforge.net