Skip to content

Instantly share code, notes, and snippets.

@krabs-github
Last active September 1, 2021 10:24
Show Gist options
  • Save krabs-github/13c1a1abaa14bb181e095e3e4cb1a8e6 to your computer and use it in GitHub Desktop.
Save krabs-github/13c1a1abaa14bb181e095e3e4cb1a8e6 to your computer and use it in GitHub Desktop.
[Change image to BASE64] Change image to BASE64 #Streamdeck
var vImage = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAYAAABV7bNHAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QAAAAAAAD5Q7t/AAAAB3RJTUUH5QcNEw8oZlqNQAAAB0VJREFUeNrtm1uIJNUZx3/n1KW7aqZnZ8edXVbXaMxlMeYlSBRNIESJkIAQIiImIAjRkIe8mwsEJIa8hIAYUTDkQSWRBEJeDCEhF0iMJCEqiIJgNFlnZ3WmZ3a2p2equ7rOycOpaWv6Ml01W6d7l9Qfdqe76lx/fS5ffd8pqFSpUqVKlSpVqlRphMQsK2+ubiAE6AS01gghcHyJ4zn70jUWG/8/gDbObaJ6CiEEGg0aHNeRSZwEGu15NRfHd7pABKjB/NOGNVVA6ytNU6MCr+6JuBNfheaTwM1CitPSlUuOK7WQYh14A/gH8E/gHUDPAtLUAK2vNM0HBUiuRnMvcDdwvXTlnOM5SCkGW9QGXgd+AfwMODNtSFMBtP5OEyFACCmVVrej+TbwKQSu4zm4njOpJT3gr8D3gD+kmKcCyTqg9ZUmAhBCSKX0PcD3gWsBXN/B8Z0ixb0FfBMzoqYCySqg5tkNAFSUIHx5J/Bj4GoAx5W4NfcwLfgP8HXgN3sXbEKSNgG1N9topRE1eRr47h4cs507CHkwHzPyhi5fk5b1YZtttw5o49wm4WIIEg/Ng8CN/UpdQaIUrVZEazsiSYZ2c5JE0dqOaLUier1k8PZNwFcBF6B1vmUNkGur4GQ3RngOaG4AvrR3XQhQaJprF2jvdACYm6uzfOwIrmt+r15Ps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EV4Angd2VVUMpqmVmfJHAVcEII8W603fkcmsezgNyai+OV5qfTwHcwEdZljJ22QoknP0oZQZlFXAFn0JyJOzFolihg1h9CAuN++W/6b1+bylBpUyzboOZKEymFBK7Evlv3JFAHIhvHYKw0XgOJ0jXMWrRf5ZtAJ7EYfrbz6xp7Z54RgCyYiFcCSwAXmhdKL7x0QBurG3skTmAW7P10yid0jL2DWW75hZcOKBMR/SDpL9u/h3HDlqwG8BHAipFVOiClTEQDzWmMmzNDSNgYQR5wvY2+WAEE0NvtgdlZ9pUvpHHiW9BQXWWp9Ni8EAJ/3gd4Hvg08AlgHqhLKWRJfBTGL5U9aG4lVl36z9k8a15Qef7pbT7/lblj2hxyOgVc49Xdj0tH3gJ8lMO5e98G/oZxiL2FsZr/jXn+0lD+kWAr472ZvpOhM9FjlSjCxcDXWl+H8dM8QP4gQAfjrHsMM2JGukxtGIrWPVcbq5skUYJTd3Dr/XM/dcyJ+YeYfABKAU+laYdcKpf1SftBDYSwjwM/Bb4wIdvfgS9jAn5TgZLVVI+/DHTsPeBHmCjDOF0AHp0VHJj2+aDhDv4J+CGjowwR8CQmnj4TODDDVzIz0y3AnJq/D7PjScx7Yc9h/Dxbs4JzqQDa0wLGXgIT9DvPjN4yzGrmZ0knHszS0Dg6u5d6K1WqVKlSpUqVKlUaqf8BF8QlSaUXfs8AAAAldEVYdGRhdGU6Y3JlYXRlADIwMjEtMDctMTNUMTg6NTE6NDcrMDA6MDDnkDPbAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIxLTA3LTEzVDE5OjE1OjM5KzAwOjAwqJPzXgAAAABJRU5ErkJggg=="
setImage(context, vImage)
function setImage(context, vImage) {
var json = {
'event': 'setImage',
'context': context,
'payload': {
'image': vImage,
'target': 0,
}
};
console.warn("setimage: ", vImage)
websocket.send(JSON.stringify(json));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment