[fpc-pascal] AV: FCL-Image and XPM image
silvioprog
silvioprog at gmail.com
Sat Jul 13 21:48:22 CEST 2013
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20130713/77fd7a9a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xpm.zip
Type: application/zip
Size: 8382 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20130713/77fd7a9a/attachment.zip>
More information about the fpc-pascal
mailing list