mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-27 10:26:19 +03:00
Added syntax print statements
This commit is contained in:
parent
3c73043509
commit
b7aab522e1
|
@ -353,6 +353,11 @@ if sys.platform == 'darwin':
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
||||||
|
if len(sys.argv) < 2:
|
||||||
|
print("Syntax: python IcnsImagePlugin.py [file]")
|
||||||
|
sys.exit()
|
||||||
|
|
||||||
imf = IcnsImageFile(open(sys.argv[1], 'rb'))
|
imf = IcnsImageFile(open(sys.argv[1], 'rb'))
|
||||||
for size in imf.info['sizes']:
|
for size in imf.info['sizes']:
|
||||||
imf.size = size
|
imf.size = size
|
||||||
|
|
|
@ -186,5 +186,9 @@ else:
|
||||||
register(XVViewer)
|
register(XVViewer)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
# usage: python ImageShow.py imagefile [title]
|
|
||||||
|
if len(sys.argv) < 2:
|
||||||
|
print("Syntax: python ImageShow.py imagefile [title]")
|
||||||
|
sys.exit()
|
||||||
|
|
||||||
print(show(Image.open(sys.argv[1]), *sys.argv[2:]))
|
print(show(Image.open(sys.argv[1]), *sys.argv[2:]))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user