Thanks for the pointers. I can't find the extinterpolation unit though.
I think I am getting an idea of how to do what I want. The only thing that
eludes me is how to get the FPImage into the TImage control? The class
hierarchy seems rather confusing there. :-(
Thanks
Charl
PS Please excuse my ignorance, this is the first time I am working with
images!
On 5/31/07, Michael Van Canneyt <[EMAIL PROTECTED]> wrote:
On Thu, 31 May 2007, Charl van Jaarsveldt wrote:
> Hi,
>
> What is the best way to resize an image? I am thinking of something
Java's
> Image class has that will return a scaled image, and you can decide
whether
> it should be a good quality or a fast one. I don't necessarily want to
write
> it to a file, just in memory. (I want to cache images in the memory and
so
> would like to have them much smaller than they are.)
There are several resizing alogirthms present in FPC. see the
extinterpolation unit.
how it happens is: create a canvas, and draw the image on the canvas with
the correct
interpolation.
If you want to create a new image in memory, create an TFPImageCanvas with
the desired
size, and draw the original canvas with the correct interpolation routine.
Michael.
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives
--
"I love deadlines. I especially love the whooshing sound they make as they
fly by." - Douglas Adams