Skip to content

Instantly share code, notes, and snippets.

@nst
Created July 3, 2024 16:29
Show Gist options
  • Save nst/c6f6c1e980d4ed8843515d93615c1cdc to your computer and use it in GitHub Desktop.
Save nst/c6f6c1e980d4ed8843515d93615c1cdc to your computer and use it in GitHub Desktop.
x
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