Get image settings like the brightness value
How can I get the brightness value from display settings (tab Adjust) and set it in a variable? I want to use it in a macro to set the brightness automatically.
Thanks in advance.
fsup
0
Comments
-
Hi fsup,
You can use LookupTable property of McImage, like this:Public Function AdjustLUT With ThisApplication.ActiveImage.LookupTable .Brightness=55 .Contrast=60 .BlackLevel=20 .WhiteLevel=200 .Realize End With End Function
Yuri
0 -
Hi Yuri,Thank you for your suggestion. Now I can read out the brightness value.
Public Sub GetDisplayBrightness MsgBox ThisApplication.ActiveImage.LookupTable.Brightness.ToString End Sub
How can I do this with an ImageSet?fsup
0 -
Hi fsup,
If you are not in Color Composite mode, then you can use similar macro to set LUT for the image at the active location of the image set (you must have a reference to MediaCy.IQL.Sets in your macro):Public Sub AdjustLUTImageSet Dim imSet As McImageSet=ThisApplication.ActiveDocument.Data If imSet Is Nothing Then Exit Sub 'not image set Dim im As McImage=imSet.GetSourceAtLocation(imSet.GetCurrentLocation,mcImageSetLocationMatchTypes.mcislmtExact).Image With im.LookupTable .Brightness=33 .Contrast=48 .BlackLevel=25 .WhiteLevel=210 .Realize End With End Sub
Yuri0 -
Hi Yuri,you are great. It works.Thank you very much.fsup0
Categories
- All Categories
- 961 Image-Pro v9 and higher
- 9 Image-Pro FAQs
- 18 Image-Pro Download & Install
- 448 Image-Pro General Discussions
- 486 Image-Pro Automation (Macros, Apps, Reports)
- 20 AutoQuant Deconvolution
- 2 AutoQuant Download & Install
- 18 AutoQuant General Discussions
- 195 Image-Pro Plus v7 and lower
- 3 Image-Pro Plus Download & Install
- 106 Image-Pro Plus General Discussions
- 86 Image-Pro Plus Automation with Macros
- 19 Legacy Products
- 16 Image-Pro Premier 3D General Discussions
- 26 Image-Pro Insight General Discussions