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
 How to use ImageEnProc.Threshold
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

AndyColmes

USA
351 Posts

Posted - Feb 04 2014 :  12:02:34  Show Profile  Reply
I am trying to use ImageEnProc.Threshold to mimic Photoshop's Threshold image adjustment where darker shades become black and lighter into white.

I would appreciate if someone can provide some guidance on how to use ImageEnProc.Threshold for this purpose.

Thanks.

xequte

39053 Posts

Posted - Feb 05 2014 :  02:26:20  Show Profile  Reply
Hi

I recommend you see the threshold code in preview.pas that is used by the Proc.DoPreviews method:

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



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

w2m

USA
1990 Posts

Posted - Feb 05 2014 :  13:11:19  Show Profile  Reply
Nigel,

I think a small demo is required to show how to use Threshold and Threshold2 or at least some Example code for which there is none at all.

William Miller
Adirondack Software & Graphics
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html
Go to Top of Page

xequte

39053 Posts

Posted - Feb 06 2014 :  17:06:47  Show Profile  Reply
Hi William

I've just added this to the documentation:

// Make values less than R/G/B of 64 black
ImageEn.Proc.Threshold(CreateRGB(64, 64, 64), CreateRGB(255, 255, 255), CreateRGB(0, 0, 0), CreateRGB(255, 255, 255));

// Make values greater than R/G/B of 192 white
ImageEn.Proc.Threshold(CreateRGB(0, 0, 0), CreateRGB(192, 192, 192), CreateRGB(0, 0, 0), CreateRGB(255, 255, 255));

// Make values with a red value greater than 192 pure red
ImageEn.Proc.Threshold(CreateRGB(0, 0, 0), CreateRGB(192,0, 0), CreateRGB(0, 0, 0), CreateRGB(255, 0, 0));


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

w2m

USA
1990 Posts

Posted - Feb 06 2014 :  21:59:06  Show Profile  Reply
I made a demo for the Threshold procedure which you may download here:
http://www.imageen.com/ieforum/topic.asp?whichpage=1&TOPIC_ID=1446#5177

William Miller
Adirondack Software & Graphics
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html
Go to Top of Page

xequte

39053 Posts

Posted - Feb 08 2014 :  12:28:53  Show Profile  Reply
Nice one

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: