Compare commits

...

3 commits

4 changed files with 7 additions and 0 deletions

View file

@ -13,4 +13,5 @@ doskey which=where $*
doskey gc=gitcheckup $*
doskey gp=git push $*
doskey gpa=git_push_all $*
doskey gfa=git fetch --all
doskey setlatest=recycle __latest $T mklink /j __latest $*

View file

@ -106,6 +106,10 @@ def resize(
log.debug('Resizing %s to %dx%d.', file.absolute_path, width, height)
resampler = PIL.Image.NEAREST if nearest_neighbor else PIL.Image.LANCZOS
if image.mode == '1':
image = image.convert('L')
image = image.resize( (width, height), resampler)
if output_file.extension == '.jpg':

View file

@ -28,6 +28,7 @@ def showqr_argparse(args):
root.title("QR code")
root.bind('<Escape>', lambda *args, **kwargs: root.quit())
root.bind('<Control-s>', lambda *args, **kwargs: save_image(root, image))
root.bind('<Control-w>', lambda *args, **kwargs: root.quit())
tk_image = PIL.ImageTk.PhotoImage(image)
tkinter.Label(root, image=tk_image).grid(row=0, column=0)

View file

@ -16,6 +16,7 @@ alias move=mv
alias copy=cp
alias md=mkdir
alias cls=clear
alias gfa=git fetch --all
# This generates a warning in some non-interactive situations, like cron.
bind TAB:menu-complete > /dev/null 2>&1