Compare commits
3 commits
a37e57058f
...
ab24374041
| Author | SHA1 | Date | |
|---|---|---|---|
| ab24374041 | |||
| 80c390653f | |||
| 07f2c8ab63 |
4 changed files with 7 additions and 0 deletions
|
|
@ -13,4 +13,5 @@ doskey which=where $*
|
||||||
doskey gc=gitcheckup $*
|
doskey gc=gitcheckup $*
|
||||||
doskey gp=git push $*
|
doskey gp=git push $*
|
||||||
doskey gpa=git_push_all $*
|
doskey gpa=git_push_all $*
|
||||||
|
doskey gfa=git fetch --all
|
||||||
doskey setlatest=recycle __latest $T mklink /j __latest $*
|
doskey setlatest=recycle __latest $T mklink /j __latest $*
|
||||||
|
|
|
||||||
|
|
@ -106,6 +106,10 @@ def resize(
|
||||||
|
|
||||||
log.debug('Resizing %s to %dx%d.', file.absolute_path, width, height)
|
log.debug('Resizing %s to %dx%d.', file.absolute_path, width, height)
|
||||||
resampler = PIL.Image.NEAREST if nearest_neighbor else PIL.Image.LANCZOS
|
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)
|
image = image.resize( (width, height), resampler)
|
||||||
|
|
||||||
if output_file.extension == '.jpg':
|
if output_file.extension == '.jpg':
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,7 @@ def showqr_argparse(args):
|
||||||
root.title("QR code")
|
root.title("QR code")
|
||||||
root.bind('<Escape>', lambda *args, **kwargs: root.quit())
|
root.bind('<Escape>', lambda *args, **kwargs: root.quit())
|
||||||
root.bind('<Control-s>', lambda *args, **kwargs: save_image(root, image))
|
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)
|
tk_image = PIL.ImageTk.PhotoImage(image)
|
||||||
tkinter.Label(root, image=tk_image).grid(row=0, column=0)
|
tkinter.Label(root, image=tk_image).grid(row=0, column=0)
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ alias move=mv
|
||||||
alias copy=cp
|
alias copy=cp
|
||||||
alias md=mkdir
|
alias md=mkdir
|
||||||
alias cls=clear
|
alias cls=clear
|
||||||
|
alias gfa=git fetch --all
|
||||||
|
|
||||||
# This generates a warning in some non-interactive situations, like cron.
|
# This generates a warning in some non-interactive situations, like cron.
|
||||||
bind TAB:menu-complete > /dev/null 2>&1
|
bind TAB:menu-complete > /dev/null 2>&1
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue