aboutsummaryrefslogtreecommitdiff
path: root/components/image.py
diff options
context:
space:
mode:
authortassaron2017-06-22 22:23:04 -0400
committertassaron2017-06-22 22:23:04 -0400
commit3c903794e3588560f2b9d342214009d55a675d5a (patch)
tree8b1b1a55343d2489b90c14020d5b174db5c7d7ea /components/image.py
parent49cda1bf3aa1800459d1085496291bec90ae6a5a (diff)
more commandline component options
commandline options that existed before the redesign are now back
Diffstat (limited to 'components/image.py')
-rw-r--r--components/image.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/components/image.py b/components/image.py
index d0e1894..f8ae64e 100644
--- a/components/image.py
+++ b/components/image.py
@@ -94,18 +94,18 @@ class Component(__base__.Component):
self.update()
def command(self, arg):
- if not arg.startswith('preset='):
- if os.path.exists(arg):
+ if not arg.startswith('preset=') and '=' in arg:
+ key, arg = arg.split('=', 1)
+ if key == 'path' and os.path.exists(arg):
try:
Image.open(arg)
- self.imagePath = arg
- self.stretched = True
- return True
+ self.page.lineEdit_image.setText(arg)
+ self.page.checkBox_stretch.setChecked(True)
+ return
except OSError as e:
print("Not a supported image format")
quit(1)
super().command(arg)
def commandHelp(self):
- print('Give a complete filepath to an image to load that '
- 'image with default settings.')
+ print('Load an image:\n path=/filepath/to/image.png')