Open mario-b00 opened 1 week ago
In the version 9.2, you will be able to apply any settings in the ImageGlass Settings by the API: IG_ApplySettings(string json)
.
Here is the example how to add 2 custom toolbar buttons to do your request:
{
"Type": "Button",
"Id": "btn_custom_1",
"Text": "Zoom > 100%: NearestNeighbor",
"DisplayStyle": "Image",
"CheckableConfigBinding": "",
"Alignment": "Left",
"Image": "C:\\path\\to\\icon.svg",
"OnClick": {
"Executable": "IG_ApplySettings",
"Arguments": [
"{ \"ImageInterpolationScaleUp\": \"NearestNeighbor\" }"
]
}
}
You can change the Id
, Text
, Image
as you want.
This adds a button Zoom > 100%: NearestNeighbor
to the toolbar:
You can repeat those steps to create another button for "when zoom>100%" on "multi-sample linear"
, using this value for the Arguments:
"Arguments": [
"{ \"ImageInterpolationScaleUp\": \"MultiSampleLinear\" }"
]
I want to create a button that sets interpolation "when zoom>100%" on the "nearest neighbor" value. And then a second button that sets interpolation "when zoom>100%" on "multi-sample linear" value. Thank you