Created
July 3, 2024 16:29
-
-
Save nst/c6f6c1e980d4ed8843515d93615c1cdc to your computer and use it in GitHub Desktop.
x
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i in range(0, int(largeur/2.)): | |
for j in range(0, int(hauteur/2.)): | |
# coordonnées du coin haut gauche | |
# pour chaque groupe de 4 pixels | |
coin_x = i*2 | |
coin_y = j*2 | |
print(coin_x, coin_y) | |
p0 = image[coin_y][coin_x] | |
p1 = image[coin_y][coin_x+1] | |
p2 = image[coin_y+1][coin_x] | |
p3 = image[coin_y+1][coin_x+1] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment