Ah, that would probably explain why I can't find it. :-)
Yeah, I want to keep a cache of images in memory while keeping open the possibility of actually saving the cache. Thanks for the help! Charl On 5/31/07, Michael Van Canneyt <[EMAIL PROTECTED]> wrote:
On Thu, 31 May 2007, Charl van Jaarsveldt wrote: > Thanks for the pointers. I can't find the extinterpolation unit though. in the FPC source tree: packages/fcl-image/src/extinterpolation.pp (it may not be present if you're working with the the 2.0.4 release) > > 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. :-( If you just want to draw it, simply draw on the TImage canvas, that should work. But TImage itself has resizing capabilities, the imgview demo shows how to do this. The disadvantage is that you can't save the resized image, as far as I know. Michael. > > 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 > _________________________________________________________________ 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
