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
 DoPreviews without dialog
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

graph_man

288 Posts

Posted - Jun 22 2022 :  14:16:38  Show Profile  Reply
I need to make color adjustments for multipage file.
For fist page I use
ImageEnProc1->DoPreviews(ppeColorAdjust);

I can save all settings by using TIPDialogParams

but

How to perform the same transformations for the rest of the pages without having to display DoPreviews dialog for each of them?

xequte

7022 Posts

Posted - Jun 22 2022 :  16:31:01  Show Profile  Reply
Hi

That is not well supported use-case at this time. You would need to use the properties in TIPDialogParams:

ImageEnView1.Proc.IPDialogParams.COLORCURVE_CurvePoints
ImageEnView1.Proc.IPDialogParams.COLORCURVE_Channel

To a configure a temporary TIEColorCurve1. And then apply it to a bitmap:

IEColorCurve1.ApplyCurve( bmp );

In a future updated we will allow DoPreviews functionality to be applied to multiple images.

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

graph_man

288 Posts

Posted - Jun 22 2022 :  16:39:27  Show Profile  Reply
Thanks. But I need all possible commands from the DoPreviews window (not only COLORCURVE).

> In a future updated we will allow DoPreviews functionality to be applied to multiple images.

It is better to add the ability to execute DoPreviews command without a dialog box.
Go to Top of Page

xequte

7022 Posts

Posted - Jun 22 2022 :  22:53:36  Show Profile  Reply
Hi

Please email me for a test version that allows you to apply the values from ImageEnView1.Proc.DoPreviews to another image.

Here are some examples:

EXAMPLE 1

// Prompt user to specify color curve settings (using our "Editing" TImageEnView)
btnApplyCurve.Enabled := ImageEnView1.Proc.DoPreviews( [peColorCurve] );

// Apply specified color curve to current image (in our "Viewing" TImageEnView)
procedure TForm1.btnApplyCurveClick(Sender: TObject);
begin
  ImageEnview1.Proc.ApplyPreviews( ImageEnView2 );
end;


EXAMPLE 2

// Allow user to specify a resampling value and apply it to all images in a folder
ssFiles := TStringList.Create;
GetFilesInFolder( ssFiles, 'D:\test\' ); // This is an example method only. It does not exist
if ImageEnView1.Proc.DoPreviews( [peResize] ) then
begin
  for i := 0 to ssFiles.Count - 1 do
  begin
    bmp := TIEBitmap.Create;
    bmp.Read( ssFiles[i] );
    ImageEnView1.Proc.ApplyPreviews( bmp );
    bmp.Write( ssFiles[i] );
    bmp.Free;
  end;
end;
ssFiles.Free;


EXAMPLE 3

// Allow the user to specify color curve settings
ImageEnView1.Proc.DoPreviews([peColorCurve]);
ImageEnView1.Proc.IPDialogParams.SaveToFile( ChangeFileExt( Application.ExeName, '.curvesettings' ));

// Apply saved color curve settings to the current image
ImageEnView1.Proc.IPDialogParams.LoadFromFile( ChangeFileExt( Application.ExeName, '.curvesettings' ));
ImageEnView1.Proc.ApplyPreviews( ImageEnView1 );


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

graph_man

288 Posts

Posted - Jun 23 2022 :  11:49:46  Show Profile  Reply
> Please email me for a test version

I sent you a message.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: