Hello,
How do I load a XPM image using only FCL-Image?
I'm trying it:
program project1;
{$mode objfpc}{$H+}
uses
FPimage, FPReadXPM;
var
r: TFPReaderXPM;
i: TFPMemoryImage;
begin
r := TFPReaderXPM.Create;
i := TFPMemoryImage.Create(48, 48);
try
i.LoadFromFile('ide_icon48x48.xpm', r);
finally
r.Free;
i.Free;
end;
end.But:
C:\Users\Silvio\Desktop\xpm>project1.exe
An unhandled exception occurred at $00412008:
EAccessViolation: Access violation
$00412008
$00411D6F
$00410B81
$0040F9B1
$004015D5 main, line 15 of project1.lpr
In attached, I'm sending a small project and my XPM image to test it.
Thank you!
Silvio Clécio
My public projects - github.com/silvioprog
