• Welcome to Vampyre Imaging Library Forum. Please login or sign up.
 

Post reply

Other options

Shortcuts: ALT+S save/post or ALT+P preview

Topic summary

Posted by sikale
 - 10 November 2012, 06:56:09
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
Posted by sikale
 - 10 November 2012, 06:41:34
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
Posted by sikale
 -  9 November 2012, 15:55:08
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。  :-[
SMF spam blocked by CleanTalk