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
 TImageEnProc Selection
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

AlphaUniform

30 Posts

Posted - May 16 2018 :  07:54:01  Show Profile  Reply
Greetings,
am I able to set a rectangle selection to TImageEnProc, so that any applied filter only take affect on the given rectangle?


Can anyone give me a hint?
Thanks very much
Alex

w2m

USA
1990 Posts

Posted - May 16 2018 :  08:54:46  Show Profile  Reply
If you are using TImageEnView, just make a selection then use the proc. Only the selected area will be affected.

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

AlphaUniform

30 Posts

Posted - May 16 2018 :  09:36:08  Show Profile  Reply
I have seen the selection of TImageEnView, but I'm using TImageEnProc in a thread with TIEBitmap, but without TImageEnView.
Is there no function in TImageEnProc where I can define a rectangle?

Thanks
Alex
Go to Top of Page

w2m

USA
1990 Posts

Posted - May 16 2018 :  09:50:04  Show Profile  Reply
I do not know of anyway to set a selection with Proc or IEBitmap. Try creating a TImageEnView in your thread with a nil owner, copy the IEBitmap to TImageEnView, set the selection with TImageEnView, call the proc function, then copy the TImageEnView.IEBitmap to the form you are using.

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

AlphaUniform

30 Posts

Posted - May 16 2018 :  10:13:50  Show Profile  Reply
Hi,
I have done it now with DrawToTIEBitmap and creating ImageEnProc with either the complete, or the partial bitmap.

Never the less, maybe you can add a SetSelection Function to "ImageEnProc nice to have list" ;)

Best regards
Alex
Go to Top of Page

xequte

39142 Posts

Posted - May 17 2018 :  20:09:47  Show Profile  Reply
Hi

I've added this in 8.0.0.

Example:
// Load an image, set center 50% to negative and save
myBitmap := TIEBitmap.Create();
myBitmap.Read( 'D:\Image.jpg' );
with TImageEnProc.CreateFromBitmap( myBitmap ) do
begin
  // Select center area of image
  SelectedRect := Rect( MulDiv( 25, myBitmap.Width, 100 ),
                        MulDiv( 25, myBitmap.Height, 100 ),
                        MulDiv( 75, myBitmap.Width, 100 ),
                        MulDiv( 75, myBitmap.Height, 100 ));
  Selected := True;
  Negative();
  Free;
end;
myBitmap.Write( 'D:\Image_Out.jpg' );
myBitmap.Free;


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

AlphaUniform

30 Posts

Posted - May 18 2018 :  01:28:37  Show Profile  Reply
Nice

Thanks for the info!
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: