From 1b8920f3f0da58791f72fcfbf0f2d9143c4af1c8 Mon Sep 17 00:00:00 2001 From: Stefan Frederik Date: Sun, 7 Nov 2021 01:32:03 +0100 Subject: [PATCH] more comments in resources.tcl --- src/resources.tcl | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/resources.tcl b/src/resources.tcl index 462153f7..4de44bd9 100644 --- a/src/resources.tcl +++ b/src/resources.tcl @@ -40,6 +40,21 @@ ## # we need to lose transparency in gif otherwise all antialiasing in png image is lost ## # so we set white background and eliminate alpha channel (unsupported in gif). ## convert -background white -alpha remove -alpha off paste.png gif:- |base64 +## +## Following shell function (and call) converts a png base64 encoded to proper +## gif89a base64 encoded format: +## to_gif () { +## echo "image create photo $1 -data \"" +## echo -n "$2" | base64 -d |convert -background white -alpha remove -alpha off - gif:- |base64 +## echo '"' +## } +## +## to_gif CtxmenuBlank " +## iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAACkAAAAsAGMLevkAAAA +## GXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAABJJREFUOI1jYBgFo2AUjAIIAAAE +## EAABf014jgAAAABJRU5ErkJggg== +## " + ## ## Toolbar buttons