imaginglib icon indicating copy to clipboard operation
imaginglib copied to clipboard

Having a problem running VCL demo

Open ZaakaJarimbo opened this issue 2 years ago • 1 comments

Discussed in https://github.com/galfar/imaginglib/discussions/33

Originally posted by ZaakaJarimbo January 14, 2023 I have just downloaded and setup the Imaging library, however, when trying to run the VCL Demo I get errors :( see attached link, does anyone know what I have done wrong?

https://www.teeseyed.online/i1.jpg Imaging1

ZaakaJarimbo avatar Jan 14 '23 12:01 ZaakaJarimbo

I could not reproduce this with Delphi 11.3, which version exactly did you use?

galfar avatar Nov 26 '23 00:11 galfar

Actually, that is some very old revision of the code.

It's been looking like this for years:

procedure TSingleImage.Assign(Source: TPersistent);
begin
  if Source = nil then
  begin
    Clear;
  end
  else if Source is TSingleImage then
  begin
    AssignFromImageData(TSingleImage(Source).FImageData);
  end
  else if Source is TMultiImage then
  begin
    if TMultiImage(Source).Valid then
      AssignFromImageData(TMultiImage(Source).FPData^)
    else
      Clear;
  end
  else
    inherited Assign(Source);
end;

galfar avatar Aug 01 '24 21:08 galfar