darknet-lantern/scripts/tests/checkimagesize.py
2025-01-11 15:16:27 +01:00

18 lines
420 B
Python

from PIL import Image
def main():
print('[+] checking image size')
im = Image.open("banner.png")
#im = Image.open("favicon.png")
width, height = im.size
print('width =',width, 'height=',height)
if width != 240 or height != 60:
print('[-] Banner doesnt have the correct size (240x60)')
return False
else:
print('[+] Banner has the correct size (240x60)')
return True
if __name__ == '__main__':
main()