As far as I know, there is no way to get the original bitmap directly from ImageEnMView when the StoreType property is set to ietThumb. You can load the original bitmap from the file by getting the filename from ImageEnMView and loading it into ImageEnView however:
procedure TForm1.ImageEnMView1ImageSelect(Sender: TObject; idx: Integer);
begin
// if StoreType = ietNormal get the bitmap from ImageEnMView else load the file
if ImageEnMView1.StoreType = ietNormal then
begin
ImageEnView1.IEBitmap.Assign(ImageEnMView1.GetTIEBitmap(idx));
ImageEnMView1.ReleaseBitmap(idx);
ImageEnView1.IO.Params.Assign(ImageEnMView1.MIO.Params[idx]);
end
else
begin
iFilename := ImageEnMView1.ImageFileName[idx];
ImageEnView1.IO.LoadFromFile(iFilename);
end;
ImageEnView1.Update;
end;
This is not redundant because when the StoreType property is set to ietThumb, ImageEnMView only contains thumbnails of the original image so the only way to get the original image is to load it directly from a file.
You can move images from one ImageEnMView to another but if the source ImageEnView StoreType is ietThumb, then the destination ImageEnMView will contain thumbnails even if the destination StoreType is ietNormal. This is because ImageEnMView does not have anyway to store the full sized image as well as a thumbnail.
procedure TForm1.Button1Click(Sender: TObject);
// copy images from Source ImageEnMView to Destination ImageEnMView
// Note if source ImageEnMView contains only thumbnails the destination ImageEnMView will also contain thumbnails
var
i: integer;
iIEBitmap: TIEBitmap;
begin
ImageEnMView2.Clear;
ImageEnMView2.LockPaint;
for i := 0 to ImageEnMView1.ImageCount - 1 do
begin
iIEBitmap := ImageEnMView1.GetTIEBitmap(i);
ImageEnMView2.AppendImage;
ImageEnMView2.SetIEBitmap(i, iIEBitmap);
ImageEnMView1.ReleaseBitmap(i);
end;
ImageEnMView2.SelectedImage := 0;
ImageEnMView2.UnLockPaint;
end;
If I were you I would just set the StoreType for both ImageEnMView to ietNormal which solves the problem because then you can get the original IEBitmap for the transition...
William Miller
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html