CINXE.COM
aloupe, a screen loupe
<!DOCTYPE html> <html lang='en'> <head> <meta charset='utf-8'> <meta name='viewport' content='width=device-width, initial-scale=1'> <meta name='description' content='Tclers wiki'> <meta name='author' content=''> <link rel='icon' href='/img/favicon.ico'> <title>aloupe, a screen loupe</title> <!-- Latest compiled and minified CSS --> <link rel='stylesheet' href='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css'> <link rel='stylesheet' href='/css/nikit.css' type='text/css'> <link rel='stylesheet' href='/css/sh_style.css' type='text/css'> <link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/jquery.tablesorter/2.31.0/css/theme.bootstrap_3.min.css' type='text/css'> <script src='//cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js'></script> </head> <body onload='sh_highlightDocument(); nikitUser();'> <nav class='navbar navbar-fixed-top navbar-inverse'> <div class='container'> <div class='navbar-header'> <button type='button' class='navbar-toggle' data-toggle='collapse' data-target='#myNavbar'> <span class='icon-bar'></span> <span class='icon-bar'></span> <span class='icon-bar'></span> </button> <ul class='nav navbar-nav'> <li class='dropdown'> <a class='dropdown-toggle' data-toggle='dropdown' href='#'> Tcler's Wiki<span class='caret'></span></a> <ul class='dropdown-menu scrollable-menu' role='menu'><li><a href='/welcome'>Home</a></li> <li><a rel='nofollow' href='/recent'>Changes</a></li> <li><a rel='nofollow' href='/_random'>Random page</a></li> <li><a rel='nofollow' href='/_new'>New page</a></li> </ul> </li> </ul> </div> <div class='collapse navbar-collapse' id='myNavbar'> <ul class='nav navbar-nav'> <li class='dropdown' id='li_idPageEdit' style='display:none'> <a class='dropdown-toggle' data-toggle='dropdown' href='#'><span id=name_idPageEdit>Page</span><span class='caret'></span></a> <ul class='dropdown-menu scrollable-menu' role='menu'><li><a rel='nofollow' href='/_edit/aloupe%2C+a+screen+loupe?A=1'>Comment</a></li> <li><a rel='nofollow' hidden='true' href='/_edit/aloupe%2C+a+screen+loupe'>Edit</a></li> <li><a rel='nofollow' href='/_upload/aloupe%2C+a+screen+loupe'>Upload</a></li> <li><a rel='nofollow' href='/ref/aloupe%2C+a+screen+loupe'>References</a></li> <li><a rel='nofollow' href='/history/aloupe%2C+a+screen+loupe'>History</a></li> <li><hr></li> <li><a href='#36a9e7f1c95b82ffb99743e0c5c4ce95d83c9a430aac59f84ef3cbfab6145068'> </a> </li> <li><a href='#f9f52c9411a2ae24c8cb3330a2b33b0dd32d1f34f3ddf065f1a6709c66710365'> Usage </a> </li> <li><a href='#36a9e7f1c95b82ffb99743e0c5c4ce95d83c9a430aac59f84ef3cbfab6145068'> </a> </li> <li><a href='#08cbe41032eae11e08b067688e8314610448c76684aef5abfcec3f1889ff3d0c'> Options </a> </li> <li><a href='#36a9e7f1c95b82ffb99743e0c5c4ce95d83c9a430aac59f84ef3cbfab6145068'> </a> </li> <li><a href='#ec2799ef3a297c095af5d92e8a388d57bc276302daf4c6b8324a73bc936408e8'> Links </a> </li> </ul> </li> <li class='dropdown' id='li_idPageNoEdit' style='display:none'> <a class='dropdown-toggle' data-toggle='dropdown' href='#'><span id=name_idPageNoEdit>Page</span><span class='caret'></span></a> <ul class='dropdown-menu scrollable-menu' role='menu'><li><a rel='nofollow' href='/ref/aloupe%2C+a+screen+loupe'>References</a></li> <li><a rel='nofollow' href='/history/aloupe%2C+a+screen+loupe'>History</a></li> <li><hr></li> <li><a href='#36a9e7f1c95b82ffb99743e0c5c4ce95d83c9a430aac59f84ef3cbfab6145068'> </a> </li> <li><a href='#f9f52c9411a2ae24c8cb3330a2b33b0dd32d1f34f3ddf065f1a6709c66710365'> Usage </a> </li> <li><a href='#36a9e7f1c95b82ffb99743e0c5c4ce95d83c9a430aac59f84ef3cbfab6145068'> </a> </li> <li><a href='#08cbe41032eae11e08b067688e8314610448c76684aef5abfcec3f1889ff3d0c'> Options </a> </li> <li><a href='#36a9e7f1c95b82ffb99743e0c5c4ce95d83c9a430aac59f84ef3cbfab6145068'> </a> </li> <li><a href='#ec2799ef3a297c095af5d92e8a388d57bc276302daf4c6b8324a73bc936408e8'> Links </a> </li> </ul> </li> <li><a href="/page/Showcase">Showcase</a></li> <li><a href="/page/Tcl+Tutorial+Lesson+0">Tutorial</a></li> <li><a href="/page/Articles">Articles</a></li> <li><a href="/page/Tcl+Playground">Playground</a></li> <li class='dropdown'> <a class='dropdown-toggle' data-toggle='dropdown' href='#'> Help<span class='caret'></span></a> <ul class='dropdown-menu scrollable-menu' role='menu'><li><a rel='nofollow' href='/page/Help'>Page Markup</a></li> <li><a rel='nofollow' href='/page/How+do+Wiki+Categories+work'>Wiki Categories</a></li> <li><a rel='nofollow' href='/page/Contents'>Topics</a></li> <li><a rel='nofollow' target='_blank' href='https://chiselapp.com/user/stevel/repository/nikit/ticket'>Report Problems</a></li> <li><a rel='nofollow' href='/privacy'>Privacy</a></li> <li><a rel='nofollow' href='/license'>License</a></li> </ul> </li> </ul> <ul class='nav navbar-nav navbar-right'> <li class='dropdown'> <a class='dropdown-toggle' data-toggle='dropdown' href='#'><span id=name_SMenu>User</span><span class='caret'></span></a> <ul class='dropdown-menu' id='ul_SMenu'> </ul> </li> </ul> <form class='navbar-form navbar-right' method='post' action='/search' id='searchform'> <input name='Q' type='text' class='form-control' placeholder='Search...'/> <input type="hidden" name="sites" value="wiki.tcl-lang.org"/> </form> </div> </div> </nav> <div class='container'> <div class='row'> <div class='col-xs-12'> <h2>aloupe, a screen loupe</h2> </div> </div> <div class='row'> <div class='col-xs-12'> <p class='mkup_p'>The <b class='mkup_b'>aloupe</b> v1.8 is a Tcl/Tk small widget / utility allowing to view the screen through a loupe.</p><p class='mkup_p'>It allows also</p><UL class='mkup_UL'><li class='mkup_li'>to make screenshots of magnified images</li><li class='mkup_li'>to pick a color from the images.</li></UL><p class='mkup_p'>It is inspired by the Tcl/Tk wiki pages:</p><UL class='mkup_UL'><li class='mkup_li'><a class='mkup_a mkup_known' href='/page/A+little+magnifying+glass'>A little magnifying glass</a></li><li class='mkup_li'><a class='mkup_a mkup_known' href='/page/A+Screenshot+Widget+implemented+with+TclOO'>A Screenshot Widget implemented with TclOO</a></li></UL><p class='mkup_p'>A <a rel='nofollow' class='mkup_a' href='https://github.com/aplsimple/aloupe/releases/download/apave_loup_choosers-3.1.1/apave_loup_choosers-3.1.1.mp4'>demo video (29 Mb) <span class='glyphicon glyphicon-globe' aria-hidden='true'></span></a> presents a sort of <i class='mkup_i'>aloupe live guide</i>. By the way, it presents also the color and date choosers of <a class='mkup_a mkup_known' href='/page/Pave%2C+sort+of+geometry+manager'>apave</a> package.</p> <p class='mkup_p'>The <b class='mkup_b'>aloupe</b> looks like this:</p><p class='mkup_p'><img alt='aloupe' src='https://aplsimple.github.io/en/tcl/aloupe/files/aloupe.png' onerror="this.src='/plume404.png'"></p><h2 id='36a9e7f1c95b82ffb99743e0c5c4ce95d83c9a430aac59f84ef3cbfab6145068' class='mkup_h1'> </h2><h2 id='f9f52c9411a2ae24c8cb3330a2b33b0dd32d1f34f3ddf065f1a6709c66710365' class='mkup_h1'> Usage </h2> <p class='mkup_p'>The <b class='mkup_b'>aloupe</b> utility runs with the command:</p><div class='sh_sourceCode'><button class='copybtn btn pull-right' data-clipboard-target='#mkup_code_0' title='Click to copy code snippet to clipboard'><span class='glyphicon glyphicon-copy' aria-hidden='true'></span></button><pre id='mkup_code_0' class='sh_tcl sh_sourceCode'> tclsh aloupe.tcl ?option value ...?</pre></div><p class='mkup_p'>where <i class='mkup_i'>option</i> may be <i class='mkup_i'>-size, -zoom, -alpha, -background, -geometry, -ontop</i>.</p><p class='mkup_p'>The <i class='mkup_i'>Img</i> and <i class='mkup_i'>treectrl</i> packages have to be installed to run it. In Debian Linux the packages are titled <i class='mkup_i'>libtk-img</i> and <i class='mkup_i'>tktreectrl</i>.</p><p class='mkup_p'>There are also stand-alone <a rel='nofollow' class='mkup_a' href='https://github.com/aplsimple/aloupe/releases'>aloupe executables <span class='glyphicon glyphicon-globe' aria-hidden='true'></span></a> for Linux / Windows.</p><p class='mkup_p'>The executables are started as simply as:</p><div class='sh_sourceCode'><button class='copybtn btn pull-right' data-clipboard-target='#mkup_code_1' title='Click to copy code snippet to clipboard'><span class='glyphicon glyphicon-copy' aria-hidden='true'></span></button><pre id='mkup_code_1' class='sh_tcl sh_sourceCode'> aloupe aloupe.exe</pre></div><p class='mkup_p'>After the start, two windows would be displayed: a moveable loupe (at the mouse pointer) and a displaying window.</p><p class='mkup_p'>The loupe is moved by drag-and-drop. At dropping the loupe, its underlying image is magnified in the displaying window.</p><p class='mkup_p'>To change a size/zoom of the loupe, use the appropriate spinboxes. After changing them, just click the loupe to update the windows.</p><p class='mkup_p'>To save the magnified image, use <i class='mkup_i'>Save</i> button.</p><p class='mkup_p'>The <i class='mkup_i'>To clipboard</i> button displays a current pixel's color at clicking the image. When hit, the button puts the color into the clipboard.</p><p class='mkup_p'>The <i class='mkup_i'>-command</i> option may be passed to <i class='mkup_i'>::aloupe::run</i> which will run the passed command at pressing the <i class='mkup_i'>To clipboard</i> button. The command may contain <i class='mkup_i'>%c</i> wildcard meaning the color value. Just to test, try and set <i class='mkup_i'>-command "puts %c"</i> option.</p><h2 id='36a9e7f1c95b82ffb99743e0c5c4ce95d83c9a430aac59f84ef3cbfab6145068' class='mkup_h1'> </h2><h2 id='08cbe41032eae11e08b067688e8314610448c76684aef5abfcec3f1889ff3d0c' class='mkup_h1'> Options </h2><p class='mkup_p'>The <b class='mkup_b'>aloupe</b> can be run with the options:</p><UL class='mkup_UL'><li class='mkup_li'><i class='mkup_i'>-size</i> - a size of the loupe's box (8 .. 256)</li><li class='mkup_li'><i class='mkup_i'>-zoom</i> - a zoom factor (2 .. 32)</li><li class='mkup_li'><i class='mkup_i'>-alpha</i> - an opacity of the loupe (0.0 .. 1.0)</li><li class='mkup_li'><i class='mkup_i'>-background</i> - a background color of the loupe</li><li class='mkup_li'><i class='mkup_i'>-geometry</i> - a displaying window's geometry set as +X+Y</li><li class='mkup_li'><i class='mkup_i'>-ontop</i> - if "true", sets the displaying window above others</li></UL><p class='mkup_p'>Some options can be used at running <b class='mkup_b'>aloupe</b> from a Tcl code:</p><UL class='mkup_UL'><li class='mkup_li'><i class='mkup_i'>-exit</i> - "false" which means "don't finish Tcl/Tk session, just close the loupe"</li><li class='mkup_li'><i class='mkup_i'>-command</i> - a command to be run at pressing the <i class='mkup_i'>To clipboard</i> button</li><li class='mkup_li'><i class='mkup_i'>-parent</i> - a parent window's path (when the parent closes, its <b class='mkup_b'>aloupe</b> children do too)</li></UL><p class='mkup_p'>From a Tcl code, <b class='mkup_b'>aloupe</b> is run this way:</p><div class='sh_sourceCode'><button class='copybtn btn pull-right' data-clipboard-target='#mkup_code_2' title='Click to copy code snippet to clipboard'><span class='glyphicon glyphicon-copy' aria-hidden='true'></span></button><pre id='mkup_code_2' class='sh_tcl sh_sourceCode'> package require aloupe ::aloupe::run ?option value ...?</pre></div><h2 id='36a9e7f1c95b82ffb99743e0c5c4ce95d83c9a430aac59f84ef3cbfab6145068' class='mkup_h1'> </h2><h2 id='ec2799ef3a297c095af5d92e8a388d57bc276302daf4c6b8324a73bc936408e8' class='mkup_h1'> Links </h2><UL class='mkup_UL'><li class='mkup_li'><a rel='nofollow' class='mkup_a' href='https://chiselapp.com/user/aplsimple/repository/aloupe/download'>Source <span class='glyphicon glyphicon-globe' aria-hidden='true'></span></a> (aloupe.zip)</li><li class='mkup_li'><a rel='nofollow' class='mkup_a' href='https://aplsimple.github.io/en/tcl/aloupe/aloupe.html'>Reference <span class='glyphicon glyphicon-globe' aria-hidden='true'></span></a></li><li class='mkup_li'><a rel='nofollow' class='mkup_a' href='https://github.com/aplsimple/aloupe/releases/download/apave_loup_choosers-3.1.1/apave_loup_choosers-3.1.1.mp4'>Demo of aloupe <span class='glyphicon glyphicon-globe' aria-hidden='true'></span></a></li><li class='mkup_li'><a rel='nofollow' class='mkup_a' href='https://github.com/aplsimple/aloupe/releases'>aloupe executables <span class='glyphicon glyphicon-globe' aria-hidden='true'></span></a> for Linux / Windows</li></UL> </div> </div> <div class='row'> <div class='col-xs-12'> <div class='Footer'>Updated 2024-05-09 08:39:23</div> </div> </div> </div> <!-- jQuery library --> <script src='https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js'></script> <script src='https://cdnjs.cloudflare.com/ajax/libs/jquery.tablesorter/2.31.0/js/jquery.tablesorter.combined.js'></script> <!-- Latest compiled JavaScript --> <script src='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js'></script> <script type='text/javascript' src='/scripts/nikit.js'></script> <script type='text/javascript' src='/scripts/sh_main.js'></script> <script type='text/javascript' src='/scripts/sh_tcl.js'></script> <script type='text/javascript' src='/scripts/sh_c.js'></script> <script type='text/javascript' src='/scripts/sh_cpp.js'></script> <!-- <script src='https://www.google.com/recaptcha/api.js'></script> --> <script src='https://hcaptcha.com/1/api.js'></script> <script>var clipboard = new ClipboardJS('.copybtn', { text: function(trigger) { return document.querySelector(trigger.getAttribute('data-clipboard-target')).textContent + '\n'; } }); sort_tables(); </script> </body> </html>