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
 Proc.DoPreviews([peResize]) get user usettings?

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
xavior Posted - Oct 25 2015 : 08:11:12
Hi,

I'm using ImageEnView1.Proc.DoPreviews([peResize]) to show preview before apply image resize.

But how can I get user settings from this Preview Window to apply them with ImageEnView1.Proc.Resample(); ?

I need to know: "Scale width", "Scale height", and "Maintain Aspect Ration"

2   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Oct 27 2015 : 00:35:40
Hi

TImageEnProc.IPDialogParams provides access to settings of the Previews dialog.

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

Unfortunately it does not include as much detail as you need (only Resize_Percent). We'll look at inlcluding more detailed property in a coming update).

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
w2m Posted - Oct 25 2015 : 09:39:50
How can I get user settings from this Preview Window to apply them with ImageEnView1.Proc.Resample?

This is not possible with DoPreview. I do not believe DoPreview was designed to return any values. DoPreview does not provide any parameters so you can use Resample to resize yourself. You have to make a selection or set the selection parameters then call Resample with the selection parameters to resample the image. Or you can also create your own dialog that provides the NewWidth, NewHeight, FilterType and bMaintainAspectRatio parameters to pass to the resample procedure.

Create your own dialog with spinedit controls to return the newwidth, newheight values and a combobox that contains the Filtertypes and a checkbox to return the MaintainAspectRatio values:
if MyRresampleDialog.ShowModal = mrOk then
begin
  NewWidth := MyResampleDialog.NewWidth1.Position;
  NewHeight :=  MyResampleDialog.NewHeight1.Position;
  FilterType :=  TResampleFilter(MyResampleDialog.FilterType1.ItemIndex);
  MaintainAspectRatio :=  MyResampleDialog.MaintainAspectRatio1.Checked;
  ImageEnView1.Proc.Resample(NewWidth, NewHeight, FilterType, MaintainAspectRatio);
end;

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