{"id":1540,"date":"2010-03-20T20:42:14","date_gmt":"2010-03-20T20:42:14","guid":{"rendered":"http:\/\/wiki.davelevy.info\/?p=1540"},"modified":"2024-03-12T16:49:19","modified_gmt":"2024-03-12T16:49:19","slug":"using-boomy-icons-with-tcltk","status":"publish","type":"post","link":"https:\/\/davelevy.info\/wiki\/using-boomy-icons-with-tcltk\/","title":{"rendered":"Using &#8220;boomy&#8221; icons with tcl\/tk"},"content":{"rendered":"<p>I spent some time over the last few days trying to populate the TK images folder with a usable image library. It seems we can now use .png\/\/.jpg. Jan 2023.<br \/>\n<!--more--><\/p>\n<p>In Dec 2022, i found out that tcltk\/wish will now process .png images, this page, <a title=\"Tk - Images at tutorialspoint\" href=\"https:\/\/www.tutorialspoint.com\/tcl-tk\/tk_images.htm\">describes how<\/a> although the functionality just seems to be there.<\/p>\n<p>The TCL <a href=\"https:\/\/www.tcl.tk\/man\/tcl8.3\/TkCmd\/image.html\">image command<\/a> manual page, and\u00a0 very<a href=\"https:\/\/wiki.tcl-lang.org\/page\/Images+With+Transparency+and+Plain+Images\"> old note on extending TCL<\/a> to manage other formats.<\/p>\n<p>Otherwise,<\/p>\n<h3>Using ImageMagick to create .gif from .png<\/h3>\n<p>I wanted to use the <a href=\"https:\/\/web.archive.org\/web\/20200809234621\/http:\/\/www.freeiconsweb.com\/toolbar_Icons.htm\">Boomy icon set<\/a>. This comes in .gif, .ico and .png. The .png is really good. The .gif has the wrong transparency colour set and so needs conversion. There are quite a lot so I wanted to use a batch operation.<\/p>\n<p>I chose to use <a href=\"http:\/\/www.imagemagick.org\/script\/index.php\">ImageMagick<\/a>. I used <acronym title=\"I now tend to use either MS bash, or a vbox linux\">cygwin shell<\/acronym> to manage the batch logic. I chose to use the .png icons as my source.<\/p>\n<pre>convert accept.png accept.gif<\/pre>\n<p><b>N.B.<\/b> dos has\/had a convert command so on windows you need to manage the PATH so that imagick&#8217;s bin folder is early in the path; I decided to explicitly invoke the command by its full hierarchical name. Here&#8217;s <a title=\"convertmany\" href=\"https:\/\/github.com\/dfl1955\/ubuntu-tools\/blob\/master\/tools\/convertmany\">my code<\/a> to do a complete directory, now on github.bash<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I spent some time over the last few days trying to populate the TK images folder with a usable image library. It seems we can now use .png\/\/.jpg. Jan 2023.<\/p>\n","protected":false},"author":1,"featured_media":3212,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","_share_on_mastodon":"0"},"categories":[27,3],"tags":[34,511,510,512,101,35,36,920,260,911],"class_list":["post-1540","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software","category-technology","tag-bash","tag-boomy-icons","tag-icons","tag-imagemagick","tag-images","tag-ksh","tag-programming","tag-software","tag-tcltk","tag-technology"],"share_on_mastodon":{"url":"","error":""},"jetpack_featured_media_url":"https:\/\/davelevy.info\/wiki\/wp-content\/uploads\/2017\/07\/tcl-tk-w650.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/posts\/1540","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/comments?post=1540"}],"version-history":[{"count":7,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/posts\/1540\/revisions"}],"predecessor-version":[{"id":10680,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/posts\/1540\/revisions\/10680"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/media\/3212"}],"wp:attachment":[{"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/media?parent=1540"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/categories?post=1540"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/tags?post=1540"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}