Take a screenshot of the window the user clicks on and name the file the same as the window title

2010-12-19 2 min read Bash Learning Photo

Take a screenshot of the window the user clicks on and name the file the same as the window title

  <td>
    <div class="text codecolorer">
      &nbsp;sleep 4; xwd >foo.xwd; mv foo.xwd "$(dd skip=100 if=foo.xwd bs=1 count=256 2>/dev/null | egrep -ao '^[[:print:]]+' | tr / :).xwd"
    </div>
  </td>
</tr>
1

In general, this is actually not better than the “scrot -d4” command I’m listing it as an alternative to, so please don’t vote it down for that. I’m adding this command because xwd (X window dumper) comes with X11, so it is already installed on your machine, whereas scrot probably is not. I’ve found xwd handy on boxen that I don’t want to (or am not allowed to) install packages on.

Continue reading

Repeat a portrait eight times so it can be cut out from a 6″x4″ photo and used for visa or passport photos

2010-12-17 2 min read Learning Photo

Repeat a portrait eight times so it can be cut out from a 6″x4″ photo and used for visa or passport photos

  <td>
    <div class="text codecolorer">
      montage 2007-08-25-3685.jpg +clone -clone 0-1 -clone 0-3 -geometry 500 -frame 5 output.jpg
    </div>
  </td>
</tr>
1

Yes, You could do it in the GIMP or even use Inkscape to auto-align the clones, but the command line is so much easier.

Continue reading