Lazarus1.0.2 Compiled "VampyreImaging.lpi"
Generate "VampyreImaging.dll"
VC++ Run "test.c"
........................
/* save image to Targa format */
ImSaveImageToFile("ctestimage.png", &Img); //Unable to generate images
DelphiXE3 Call VampyreImaging.dll //Unable to generate images too
but VampyreImaging.dll of DelphiXE3 Generated
generate images is OK.
How do I set Lazarus?
Sorry, my English is poor。 :-[
Delphi create Image: TImageData;
ImNewImage(256, 256, ifA8R8G8B8, Image);
Passed to Lazarus
Run " TestImage(Image) "
Result is:
LongInt(Image.Width) 1242488 // Should be 256
LongInt(Image.Height) 1243380 //Should be 256
LongInt(Image.Format) 6244311 // Should be 88
Google to Similar problems:
http://community.freepascal.org:10000/bboards/message?message_id=335641&forum_id=24082
function ImSaveImageToFile(FileName: PAnsiChar; const Image: TImageData): Boolean; cdecl;
Modified to
function ImSaveImageToFile(FileName: PAnsiChar; const Image: PImageData): Boolean; cdecl;
or
function ImSaveImageToFile(FileName: PAnsiChar; var Image: TImageData): Boolean; cdecl;
Delphi Pass a PImageData pointer to Lazarus
or
var Image
run is OK ;D