Hi:
I am pasting from the clipboard into an ImageEnMView. My goal is to have the pasted image be appended to the end of the images in the ImgeEnMView.
The Problem is that after pasting the image, the Width and Height parameters return zero. I need to display these values on the statusbar of my form.
What am I doing wrong?
PS: I'm using the latest version of 3.x.
var
tempBmp: TBitmap;
idx: integer;
begin
// First append an empty image to ImageEnMView
idx := ImageEnMView.AppendImage;
tempBmp := TBitmap.Create;
try
tempBmp.Width := ImageEnMView.Width; {this is not zero}
tempBmp.Height := ImageEnMView.Height; {nor is this}
tempBmp.PixelFormat := pf24bit;
ImageEnMView.SetImage(idx, tempBmp);
finally
FreeAndNil(tempBmp);
end;
//Now paste into the image we just appended.
ImageEnMView.Proc.PasteFromClipboard;
//PROBLEM IS HERE - This shows zero instead of image width
ShowMessage(IntToStr(ImageEnMView.MIO.Params[idx].Width));
end;