ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Copy images from one TImageEnMView to another

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
Milo Posted - Jun 17 2014 : 06:40:40
Hi all !

I am trying to implement multiple document scanning that is based on EAN code recognition. I have implemented basic logic, but now I am stuck trying to copy images from one multiview (TImageEnMView) to another. Basicly, program will split image into files.

How can I copy image from ImageEnMView1 to ImageEnMView2 ?

... some code for better understanding:

for idx := 0 to ImageEnMView1.ImageCount - 1 do
begin
if (condition) then
// copy ImageEnMView1 image to ImageEnMView2
end;
2   L A T E S T    R E P L I E S    (Newest First)
Milo Posted - Jun 19 2014 : 01:00:15
Thank you !

It works now, trick was in selecting image before copying it.

Regards Milo


for idx := 0 to ImageEnMView1.ImageCount - 1 do
begin
  // select image
  ImageEnMView1.SelectedImage := idx;
  // if condition
  if (LastCode <> ImageEnMView1.ImageBottomText[idx].Caption) then
  begin
    LastCode := ImageEnMView1.ImageBottomText[idx].Caption;
    // save & clear
  ImageEnMIO2.SaveToFilePDF(ImageEnMView1.ImageBottomText[idx].Caption);
    ImageEnMView2.Clear;
  end;	
  { Add an image to ImageEnMView2 }
  iIndex := ImageEnMView2.AppendImage;
  { Copy iebitmap from ImageEnMView1 to ImageEnMView2 }
  ImageEnMView2.SetIEBitmap(iIndex, ImageEnMView1.IEBitmap);
end;
w2m Posted - Jun 17 2014 : 10:48:59
procedure TForm1.CopySelected1Click(Sender: TObject);
{ Copy the selected image in ImageEnMView1 to ImageEnMView2. }
var
  i: Integer;
  iIndex: integer;
begin
  for i := 0 to ImageEnMView1.ImageCount - 1 do
  begin
    if ImageEnMView1.SelectedImage = i then
    begin
      { Add an image to ImageEnMView2 }
      iIndex := ImageEnMView2.AppendImage;
      { Copy iebitmap from ImageEnMView1 to ImageEnMView2 }
      ImageEnMView2.SetIEBitmap(iIndex, ImageEnMView1.IEBitmap);
      { Set the bottom text of ImageEnMView2 }
      ImageEnMView2.ImageBottomText[iIndex].Caption := ImageEnMView1.ImageBottomText[i].Caption;
    end;
  end;
end;


Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development