On Wed, 8 Jul 2015, aradeonas wrote:
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;
What is the exception you get ?
The loading should go automatically, provided you have included the necessary
reader files (fpreadjpeg.pas) in your uses clause.
Michael.
--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus