Hello, I wanted to try the vampyre library but I don't know how to display the image, I get an Access violation error.
Could you please tell me what I'm doing wrong?
procedure TForm1.FormCreate(Sender: TObject);
begin
FImage := TMultiImage.Create;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
if OpenDialog1.Execute then
begin
FImage.LoadFromFile(OpenDialog1.FileName);
PaintBox1.Invalidate;
end;
end;
procedure TForm1.FormDestroy(Sender: TObject);
begin
FImage.Free;
end;
procedure TForm1.PaintBox1Paint(Sender: TObject);
begin
DisplayImage(PaintBox1.Canvas, 0, 0, FImage);
end;