[Lazarus] Color thief

aradeonas aradeonas at operamail.com
Wed Jul 8 20:56:23 CEST 2015


For now I used lovely BGRABitmap like this,thanks to its author
circular.

> uses BGRABitmap, BGRABitmapTypes, BGRAColorQuantization;
>
> var  bmp:TBGRABitmap;  quant: TBGRAColorQuantizer;  i: Integer; begin
> bmp:=TBGRABitmap.Create('E:\photo1.jpg');  quant :=
> TBGRAColorQuantizer.Create(bmp, acIgnore, 5);  for i := 0 to quant.ReducedPalette.Count-
> 1 do  begin    with TPanel.Create(Self) do    begin      Parent :=
> Self;      Align := alTop;
> Color:=BGRAToColor(quant.ReducedPalette.Color[i]);    end;    end;
>

Regards, Ara


-- 
http://www.fastmail.com - Faster than the air-speed velocity of an
                          unladen european swallow

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20150708/ec4f2c03/attachment-0003.html>


More information about the Lazarus mailing list