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
 DPI issue in the latest version
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

graph_man

328 Posts

Posted - Mar 18 2016 :  10:12:21  Show Profile  Reply
ImageEnIO1
AttachedImageEn = ImageEnView1

There is a file with 400 dpi resolution

If I use

ImageEnIO1->Params->ImageIndex = 0;
ImageEnIO1->LoadFromFileAuto(TempFileTiff);

result

ImageEnIO1->Params->DpiX = 400
ImageEnView1->DpiX = 300

How to fix it?

xequte

38940 Posts

Posted - Mar 20 2016 :  20:14:36  Show Profile  Reply
Hi

ImageEnView.DPIX/DPIY is deprecated in v6.2.2. You should use ImageEnView.IO.Params.DPIX/DPIY (or in your case ImageEnIO.Params.DPIX/DPIY).

ImageEnView.DPIX/DPIY is still available for compatibility, but it only returns the correct value if you use TImageEnView.IO, rather than attaching a TImageEnIO to a TImageEnView.

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

xequte

38940 Posts

Posted - Mar 21 2016 :  03:21:27  Show Profile  Reply
 

But I need TImageEnIO because TimageEnView.IO doesn't all TImageEnIO properties. How to use OnProgress (foe example) etc.?



You can access all the properties of TImageEnView.IO in the same was as a standalone TImageEnIO, this includes assigning TImageEnView.IO.OnProgress (Though you can just use TImageEnView.OnProgress which is called by TImageEnView.IO.OnProgress anyway).


Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

xequte

38940 Posts

Posted - Mar 21 2016 :  21:09:00  Show Profile  Reply
Hi

Actually you need only ever use the TImageEnView.OnProgress. If you care only for TImageEnIO progress then check whether the sender is a TImageEnIO.

Example

// An example showing seperate progress display for I/O operations and processing operations
procedure TMDIChild.ImageEnView1Progress(Sender: TObject; per: Integer);
begin
  // I/O PROGRESS
  if Sender is TImageEnIO then
  begin
    IOProgressBar.Position := per;
    IOProgressBar.Visible := True;
  end
  else
  // IMAGE PROCESSING PROGRESS
  if Sender is TImageEnProc then
  begin
    ProcProgressBar.Position := per;
    ProcProgressBar.Visible := True;
  end
end;

// Hide the progress bar
procedure TMDIChild.ImageEnView1FinishWork(Sender: TObject);
begin
  // I/O PROGRESS
  if Sender is TImageEnIO then
    IOProgressBar.Visible := False
  else
  // IMAGE PROCESSING PROGRESS
  if Sender is TImageEnProc then
    ProcProgressBar.Visible := False;
end;


Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

graph_man

328 Posts

Posted - Mar 22 2016 :  03:20:27  Show Profile  Reply
Thanks
Go to Top of Page

graph_man

328 Posts

Posted - Mar 22 2016 :  04:37:41  Show Profile  Reply
1)
There is TSaveImageEnDialog with

AttachedImageEnIO = ImageEnIO1

How to be if I replace ImageEnIO1 with ImageEnView1->IO ?

2)
Also TImageEnIO has

OnDoPreviews = ImageEnIO1DoPreviews

How to use this event with ImageEnView->IO ?
Go to Top of Page

xequte

38940 Posts

Posted - Mar 22 2016 :  15:02:09  Show Profile  Reply
Hi

1. You can just attach a TImageEnView to a TSaveImageEnDialog, e.g.

SaveImageEnDialog1.AttachedImageEnIO := ImageEnView1;


2. Please see example 2 at:

http://www.imageen.com/help/TImageEnProc.OnPreview.html



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: