GDK: fast image scaling - how?


I'm using gtk+ 1.2 and want to display some image data by using GDK. The
image is already in memory but I want it to display at half size only (in each
axis). Is there already a function that can do that ("scale down")? And if
not, what would be the best (=fastest working) approach to it? (Btw, Gnome is
not installed if there are any libraries for this).

A second, related problem is, that I want to take a part of the original
image and scale it up by a factor of 2 (like a magnifying glass). Now, is that
the same problem as above or is it more simple to achieve?

Btw, the up and down scaling hasn't to be of good quality (no anti-aliasing,
etc.), simple pixel cutting/duplicating is fine. The image I have is an 8bit
grayscale image (748x576).

Thanks for helping in advance!

+++ GMX - Mail, Messaging & more +++
NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen!

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]