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.
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
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
Comments
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
Public Sub GetDisplayBrightness MsgBox ThisApplication.ActiveImage.LookupTable.Brightness.ToString End Sub
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):
Yuri