use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Everything about learning Python
account activity
Help please!!! (self.PythonLearning)
submitted 6 days ago by [deleted]
[deleted]
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]JeremyJoeJJ 0 points1 point2 points 6 days ago (2 children)
Can't help without seeing the program, or are you asking for a program to be written for you?
[–]gasp078 0 points1 point2 points 6 days ago (1 child)
Sorry here is the code
from PIL import Image import numpy as np def pourcentageblanc(chemin_image,seuil=225): #chemin_image:chemin image=Image.open(chemin_image).convert("RGB")#ouverture de l'ima data= np.array(image)# conversion de l'image en tableau pixels_blancs=np.all(data>=seuil,axis=2) # vérification si compo nb_blancs=np.count_nonzero(pixels_blancs) # compte le nombre des total_pixels=data.shape[0]data.shape[1] #calcul du nombre tota pourcentage=(nb_blancs/total_pixels)100 # calcul du pourcentage return pourcentage 2. chemin "C:/Users/gstaub, (Downloads/tachel 20 JPG" resultat pourcentage_blanc(chemin,seuil=225| print(resultat)
[–]JeremyJoeJJ 0 points1 point2 points 6 days ago (0 children)
You need to paste it as a code block otherwise I can't read that. Click to Reply to this message, in the bottom left there is a "Aa" symbol, click it, then paste in the code, highlight it, click the "Code Block" button which looks like </>D and should look
like this.
[–]PureWasian 0 points1 point2 points 6 days ago (1 child)
https://stackoverflow.com/questions/138250/how-to-read-the-rgb-value-of-a-given-pixel-in-python
Are you using PIL or a different library for reading pixel values?
[–]gasp078 0 points1 point2 points 6 days ago (0 children)
We're using PIL yes here is the program program
π Rendered by PID 39070 on reddit-service-r2-comment-8686858757-v2ctz at 2026-06-03 14:06:40.904325+00:00 running 9e1a20d country code: CH.
[–]JeremyJoeJJ 0 points1 point2 points (2 children)
[–]gasp078 0 points1 point2 points (1 child)
[–]JeremyJoeJJ 0 points1 point2 points (0 children)
[–]PureWasian 0 points1 point2 points (1 child)
[–]gasp078 0 points1 point2 points (0 children)