Hello,
to fill a TImageEnMView with WIA content you have to loop among all children of WIAParams.Device (that is the root). Example:
var
i, iidx: integer;
begin
// prompt user to select a device
ImageEnMView1.MIO.SelectAcquireSource([ieaWIA]);
// loop among children of Device (the root item)
for i:=0 to ImageEnMView1.MIO.WIAParams.Device.Children.Count-1 do
// process only images
if witImage in TIEWiaItem(ImageEnMView1.MIO.WIAParams.Device.Children[i]).ItemType then
with ImageEnMView1.MIO.WIAParams, Device do
begin
// add new empty image
iidx := ImageEnMView1.AppendImage(1, 1);
// get thumbnail and store in TImageEnMView bitmap
GetItemThumbnail(Children[i], ImageEnMView1.GetTIEBitmap(iidx));
// close GetTIEBitmap()
ImageEnMView1.ReleaseBitmap(iidx);
// just to associate TImageEnMView item with WIA item
ImageEnMView1.ImageUserPointer[iidx] := Children[i];
end;
end;
Now you can load the full image into a TImageEnView when user select a thumbnail (handling OnImageSelect of TImageEnMView), retrieving the item stored in ImageUserPointer[] property:
procedure TForm1.ImageEnMView1ImageSelect(Sender: TObject; idx: Integer);
begin
ImageEnView1.IO.WIAParams.ProcessingBitmap := ImageEnView1.IEBitmap;
ImageEnView1.IO.WIAParams.Transfer( ImageEnMView1.ImageUserPointer[idx] , false);
ImageEnView1.Update;
end;
Hope this helps.