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

Reply via email to