Création du Noise.redme et début de recherche, ajout des docs
This commit is contained in:
parent
3494ecec32
commit
592d19184d
|
@ -0,0 +1,15 @@
|
||||||
|
Classes:
|
||||||
|
|
||||||
|
/******************/
|
||||||
|
/** COLORIZATION **/
|
||||||
|
/******************/
|
||||||
|
Principe: colorer en modifiant les pixels (n&b) dans un ton (teinte) précisée
|
||||||
|
|
||||||
|
restitue la contraste mais recentre la couleur autour de la teinte
|
||||||
|
/************ ALGO **************/
|
||||||
|
i = 50 // incertitude
|
||||||
|
t = RGBPixel(1,2,3) // teinte souhaitée
|
||||||
|
p = RGBPixel(1,2,3) // couleur actuelle
|
||||||
|
|
||||||
|
/************ CODE **************/
|
||||||
|
def colorize(pixel, tint):
|
|
@ -29,13 +29,16 @@ def testFileIntegrity():
|
||||||
# Parsing
|
# Parsing
|
||||||
img.parse( binFile );
|
img.parse( binFile );
|
||||||
|
|
||||||
|
inct = 50; # incertitude
|
||||||
|
|
||||||
# MODIFICATIONS des pixels
|
# MODIFICATIONS des pixels
|
||||||
for line in img.content.map:
|
for line in img.content.map:
|
||||||
for pixel in line:
|
for pixel in line:
|
||||||
pixel.setRGB(
|
pixel.setRGB(
|
||||||
( 255 - pixel.r ) % 256,
|
(230-25) + (2*25*pixel.r/256), # 230 ± 25
|
||||||
( 255 - pixel.g ) % 256,
|
(170-inct) + (2*inct*pixel.g/256), # 170 ± 50
|
||||||
( 255 - pixel.b ) % 256
|
(100-inct) + (2*inct*pixel.b/256), # 100 ± 50
|
||||||
|
bpp=24
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 768 KiB |
Binary file not shown.
After Width: | Height: | Size: 768 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue