[fpc-pascal] Duplicating palette of TFPCustomImage
dhkblaszyk at zeelandnet.nl
dhkblaszyk at zeelandnet.nl
Thu Nov 1 13:18:57 CET 2007
Hi,
I'm entering unknown territories with TFPCustomImage. What I would like to
do is, to duplicate the palette of a loaded image to a newly created image
in memory. Something like:
NewImg := TFPMemoryImage.Create(OrgImg.Width, OrgImg.Height);
NewImg.Palette.Build(OrgImg);
I also tried
NewImg.Palette.Merge(OrgImg.Palette);
But both yield image distortions when copying the pixels one by one.
What is the correct way of doing this?
Darius
More information about the fpc-pascal
mailing list