[Lazarus] Color thief

aradeonas aradeonas at operamail.com
Wed Jul 8 16:23:35 CEST 2015


Thank you.

I get exception when try to load from file and I could not debug in FPC
source,debugger don't go there:

> var  i: Integer;  Img: TFPCustomImage;  reader: TFPCustomImageReader;
> begin  Img := TFPCustomImage.Create(0, 0);  Reader :=
> TFPReaderJPEG.Create;  img.LoadFromFile('E:\photo1.jpg',Reader);
> img.UsePalette := True;  for i := 0 to img.Palette.Count do  begin
> with TPanel.Create(Self) do    begin      Parent := Self;      Align
> := alTop;      Color:=FPColorToTColor(img.Palette.Color[i]);    end;
> end;  end;
>

Also is there a class to do file loading with readers automatically like
TImage? Tlazintfimage seems not does this . yes its not hard to
implement it but as just now I find out there is many things in Lazarus
and FreePascal that I'm not aware of them!

Regards, Ara

-- 
http://www.fastmail.com - Access your email from home and the web

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


More information about the Lazarus mailing list