File tree Expand file tree Collapse file tree 2 files changed +11
-7
lines changed
Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change 4141 /opt/python/cp312-cp312/bin/python tests/test_color_gen.py test_image.jpg 1
4242
4343 /opt/python/cp39-cp39/bin/pip install auditwheel
44- mp dist/*.tar.gz wheelhouse/
44+ mkdir wheelhouse
45+ mv dist/*.tar.gz wheelhouse/
4546 auditwheel repair dist/*
47+ echo "Built dists:"
48+ ls wheelhouse
4649 - name : Publish to PyPI
47504851 if : github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
Original file line number Diff line number Diff line change 1313from PIL import Image
1414rgba_to_hex = lambda rgba : "#{:02X}{:02X}{:02X}{:02X}" .format (* map (round , rgba ))
1515
16- if not os .path .isfile (sys .argv [1 ]):
16+ FILENAME = sys .argv [1 ]
17+
18+ if not os .path .isfile (FILENAME ):
1719 print ("Downloading test image file: " )
18- with open (sys . argv [ 1 ] , "wb" ) as file :
20+ with open (FILENAME , "wb" ) as file :
1921 file .write (
2022 requests .get (
21- "https://upload.wikimedia.org/wikipedia/commons/thumb/1/19/"
22- "Lisse%2C_Netherlands_-_panoramio_%2844%29.jpg/1280px-Lisse%2C_Netherlands_-_panoramio_%2844%29.jpg"
23+ "https://unsplash.com/photos/u9tAl8WR3DI/download?ixid=M3wxMjA3fDB8MXx0b3BpY3x8NnNNVmpUTFNrZVF8fHx8fDJ8fDE3MDUyMDgwNjF8&force=true"
2324 ).content )
24- print ("Downloaded!" )
25+ print ("Downloaded: " , FILENAME , os . path . exists ( FILENAME ) )
2526
2627console = Console ()
2728
2829start = default_timer ()
29- image = Image .open (sys . argv [ 1 ] )
30+ image = Image .open (FILENAME )
3031
3132pixel_len = image .width * image .height
3233image_data = image .getdata ()
You can’t perform that action at this time.
0 commit comments