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
 How to use ImageEnProc.Threshold

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
AndyColmes Posted - Feb 04 2014 : 12:02:34
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.
5   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Feb 08 2014 : 12:28:53
Nice one

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
w2m Posted - Feb 06 2014 : 21:59:06
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
xequte Posted - Feb 06 2014 : 17:06:47
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
w2m Posted - Feb 05 2014 : 13:11:19
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
xequte Posted - Feb 05 2014 : 02:26:20
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