<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body><div>Thank you.<br></div>
<div> </div>
<div>I get exception when try to load from file and I could not debug in FPC source,debugger don't go there:<br></div>
<div> </div>
<blockquote><div>var<br></div>
<div>  i: Integer;<br></div>
<div>  Img: TFPCustomImage;<br></div>
<div>  reader: TFPCustomImageReader;<br></div>
<div>begin<br></div>
<div>  Img := TFPCustomImage.Create(0, 0);<br></div>
<div>  Reader := TFPReaderJPEG.Create;<br></div>
<div>  img.LoadFromFile('E:\photo1.jpg',Reader);<br></div>
<div>  img.UsePalette := True;<br></div>
<div>  for i := 0 to img.Palette.Count do<br></div>
<div>  begin<br></div>
<div>    with TPanel.Create(Self) do<br></div>
<div>    begin<br></div>
<div>      Parent := Self;<br></div>
<div>      Align := alTop;<br></div>
<div>      Color:=FPColorToTColor(img.Palette.Color[i]);<br></div>
<div>    end;<br></div>
<div>  end;<br></div>
<div>end;  <br></div>
<div> </div>
</blockquote><div> </div>
<div>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! <br></div>
<div> </div>
<div>Regards,<br></div>
<div>Ara<br></div>
<pre>
-- 
http://www.fastmail.com - Access your email from home and the web
</pre>
</body>
</html>