Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

algorithme permettant de passer au negatif une image

Im ← ? # On charge une image en lui donnant le nom "Im" par exemple
		L, H ← Im.size  # On récupère les dimensions de l'image chargée
		NegIm ← ? # On crée une nouvelle image nommée "NegIm" de dimensions LxH
		Pour y allant de 0 à H-1 : # On parcourt les pixels de l'image "Im" en hauteur
			Pour x allant de 0 à L-1 : # On parcourt les pixels de l'image "Im" en largeur
				r, v, b ← ? On récupère les composantes RVB du pixel de coordonnées (x ; y) de l'image "Im"
				On affecte au pixel de l'image "NegIm" de coordonnées (x ; y) les composantes (255-r, 255-v, 255-b)
			Fin Pour
		Fin Pour
		On sauvegarde la nouvelle image "NegIm" dans le dossier qu'on veut en lui donnant un nom
		On affiche la nouvelle image "NegIm"
Comment

PREVIOUS NEXT
Code Example
Python :: how to use django-filters with viewset 
Python :: how to run matrix in python 
Python :: how to write list into csv file in python 
Python :: striding in python 
Python :: python why is it important to check the __name__ 
Python :: python item defined in different definition stackoverflow 
Python :: df filter by multiple rules python 
Python :: get key of min value 
Python :: boxplot python count of data 
Python :: aritmetics to a value in a dict python 
Python :: non preemptive priority scheduling in c# 
Python :: python length checker/fill 
Python :: the grandest staircase of them all foobar solution 
Python :: what does it mean when i get a permission error in python 
Python :: while attempts 0: 
Python :: declare variable in python 
Python :: pyglet on close 
Python :: flask Upload file to local s3 
Python :: tensorflow tf.constant 
Python :: pyqt5 open tab 
Python :: python check if more than 1 is true 
Python :: get random consonant python 
Python :: combining list alternatively 
Python :: python get_loc not returning number 
Python :: unction which takes in a list of integers and returns a dictionary of the five number summary.. 
Python :: installing django on windows 
Python :: Define a python function day_of_week, which displays the day name for a given date supplied in the form (day,month,year). 
Python :: tweepy stream extended mode 
Python :: python average function program 
Python :: python heroku 
ADD CONTENT
Topic
Content
Source link
Name
5+4 =