![]() |
![]() |
![]() |
procedure ReplaceColor(oldColor, newColor: TColor32);
Replaces a color with another, but only where pixels exactly match oldColor.
Note: Be careful when using this procedure in antialiased drawings as oldColor will mostly remain where antialiasing has blended this with adjacent colors.
uses Image32, Image32_Extra, Image32_PNG; ... img := TImage32.Create; img.LoadFromFile('beetle_aq.png'); //make aqua colored pixels transparent, but unlike EraseColor, //here there's no accommodation for blended colors ReplaceColor(img, clAqua32, clNone32); img.SaveToFile('beetle3.png'); img.Free;
Before:![]() |
After:![]() ![]() |
Copyright ©2019 Angus Johnson - Image32 ver. 1.54 - Documentation last updated on 7-November-2020