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
 Possible to save effects settings ?
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

mastinf

Italy
46 Posts

Posted - Oct 30 2015 :  05:01:19  Show Profile  Reply
In my application i use the following code to open the image effect dialog:

img.Proc.DoPreviews(ppeEffects)

I would like to save the settings somewhere where the window is closed.
Is there a way to save all settings ? Or, how can access the settings (i'm particulary interested to the resize settings) after the effect dialog is closed ?

thanks

Roberto
Imagen 5.2

Roberto Nicchi
Master Informatica
Italy

w2m

USA
1990 Posts

Posted - Oct 30 2015 :  10:11:30  Show Profile  Reply
According to the documentation this should function:
procedure TForm1.Button1Click(Sender: TObject);
var
  iAppSettingsFolder: string;
begin
  {Set default "Crop" parameters}
  ImageEnView1.Proc.IPDialogParams.Crop_Left := 0;
  ImageEnView1.Proc.IPDialogParams.Crop_Top := 0;
  ImageEnView1.Proc.IPDialogParams.Crop_Right := 32;
  ImageEnView1.Proc.IPDialogParams.Crop_Bottom := 32;
  {Set default "Resize" parameters}
  ImageEnView1.Proc.IPDialogParams.Resize_Percent := 50;
  iAppSettingsFolder := AppDataFolder + 'ASG\Apprehend\';
  {Make parameters persistent (saved between sessions)}
  if FileExists(iAppSettingsFolder + 'Previews.dat') then
    ImageEnView1.Proc.IPDialogParams.LoadFromFile(iAppSettingsFolder +
      'Previews.dat');
  if ImageEnView1.Proc.DoPreviews([peCrop]) then
    ImageEnView1.Proc.IPDialogParams.SaveToFile(iAppSettingsFolder +
      'Previews.dat');
end;

but with respect to the crop preview, there seems to be three problems with the dialog:
1. When you set the crop parameters before the dialog is displayed, the crop values are set to the passed parameters but the dialog selects the entire image instead of the crop values.
2. If you change the crop parameters at runtime, the selection does not change to match the values shown in the spinedits.
3. When the dialog is shown after the settings have been saved to a file the spinedits match that saved to the file but the whole image remains selected.

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

mastinf

Italy
46 Posts

Posted - Oct 30 2015 :  10:22:39  Show Profile  Reply
many thanks !

Roberto

Roberto Nicchi
Master Informatica
Italy
Go to Top of Page

xequte

39077 Posts

Posted - Oct 30 2015 :  16:57:23  Show Profile  Reply
Hi Bill,

Please ensure that the preview is enabled.

ImageEnView1.Proc.PreviewsParams := ImageEnView1.Proc.PreviewsParams + [ prppDefaultLockPreview ];




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: