participation
This commit is contained in:
commit
e24c932cee
1 changed files with 12 additions and 0 deletions
12
participation/0.py
Normal file
12
participation/0.py
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
# Header
|
||||||
|
header = "P3 512 512 255" # 14 bytes
|
||||||
|
|
||||||
|
# Black pixels
|
||||||
|
# Counting leading pixels, every value takes up 2 bytes
|
||||||
|
black_image_len = len(header) + (2 * 512 * 512)
|
||||||
|
print(black_image_len) # 524302
|
||||||
|
|
||||||
|
# White pixels
|
||||||
|
# Counting leading pixels, every value takes up 4 bytes
|
||||||
|
white_image_len = len(header) + (4 * 512 * 512)
|
||||||
|
print(white_image_len) # 1048590
|
Loading…
Reference in a new issue