ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder
ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Questions regarding ImageEnMview
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

ImageEnSA

13 Posts

Posted - Sep 04 2019 :  03:32:54  Show Profile  Reply
Hi Everyone,

I have two components: ImageEnMview1 and ImageEnView1.

I want to do the following:

1- When I execute this statement

ImageEnMView1.MIO.Acquire;


I want to add scanned images to the existing list of ImageEnMview (Not clear it, then add them).


2- When I press on any page on the ImageEnMview, it shows it on ImageEnView based on these statements

procedure TfrmMain.ImageEnMView1ImageSelect(Sender: TObject; idx: Integer);
var
  iFilename : WideString;
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;


my Question here, How to save all these images as png or bmp files (separated files, 1.bmp, 2.bmp ....etc)



3- On the ImageEnView, I can rotate the image using this statement
procedure TfrmMain.Button3Click(Sender: TObject);
begin
 // ImageEnView1.LayersRotateAll(90);
 ImageEnView1.Proc.Rotate( 270 );
end;


How to update the Bmp file of this rotation action?


Thank you

ImageEnSA

13 Posts

Posted - Sep 04 2019 :  03:50:06  Show Profile  Reply
I'm doing this based on AllAcquire.dproj demo example. Each time I scan, the ImageEnMview cleared before adding the newly scanned images!
Go to Top of Page

ImageEnSA

13 Posts

Posted - Sep 04 2019 :  03:55:12  Show Profile  Reply
For Question 1:
based on Nigel guidance, I delete
ImageEnMView1.Clear;
and now it working perfectly

But I hope I get answers for Q2,3
Go to Top of Page

xequte

4714 Posts

Posted - Sep 04 2019 :  03:55:16  Show Profile  Reply
1. By default, it is not cleared

2. You can use:

// Save all images in control to separate files
for i := 0 to ImageEnMView1.ImageCount - 1 do
  ImageEnMView1.GetImageToFile( i, 'D:\Image' + IntToStr( i ) + '.jpeg' );


3. You would need to save the changes back to the file, e.g. using:

https://www.imageen.com/help/ImageEn/TImageEnMView.GetImageToFile.html

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

ImageEnSA

13 Posts

Posted - Sep 04 2019 :  04:10:29  Show Profile  Reply
Perfect :) , thanks Nigel
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To: