Added examples for channel_offset, led_screen and pixel_smear
This commit is contained in:
parent
6440019de2
commit
2a15d81651
10 changed files with 58 additions and 1 deletions
BIN
examples/channel_offset/original.png
Normal file
BIN
examples/channel_offset/original.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 354 KiB |
BIN
examples/channel_offset/result.png
Normal file
BIN
examples/channel_offset/result.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 361 KiB |
14
examples/channel_offset/run.py
Executable file
14
examples/channel_offset/run.py
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
from sys import path
|
||||
path.append("../../")
|
||||
|
||||
from PIL import Image
|
||||
|
||||
from glitch import channel_offset
|
||||
from glitch import hsv
|
||||
|
||||
if __name__ == "__main__":
|
||||
img: Image.Image = Image.open("original.png").convert("RGB")
|
||||
channel_offset(img, (2, 0), (-2, -2), (0, 2))
|
||||
img.save("result.png")
|
BIN
examples/led_screen/original.png
Normal file
BIN
examples/led_screen/original.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 182 KiB |
BIN
examples/led_screen/result.png
Normal file
BIN
examples/led_screen/result.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 28 KiB |
13
examples/led_screen/run.py
Executable file
13
examples/led_screen/run.py
Executable file
|
@ -0,0 +1,13 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
from sys import path
|
||||
path.append("../../")
|
||||
|
||||
from PIL import Image
|
||||
|
||||
from glitch import led_screen
|
||||
|
||||
if __name__ == "__main__":
|
||||
img: Image.Image = Image.open("original.png").convert("RGB")
|
||||
led_screen(img)
|
||||
img.save("result.png")
|
BIN
examples/pixel_smear/original.png
Normal file
BIN
examples/pixel_smear/original.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 334 KiB |
BIN
examples/pixel_smear/result.png
Normal file
BIN
examples/pixel_smear/result.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 273 KiB |
14
examples/pixel_smear/run.py
Executable file
14
examples/pixel_smear/run.py
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
from sys import path
|
||||
path.append("../../")
|
||||
|
||||
from PIL import Image
|
||||
|
||||
from glitch import pixel_smear
|
||||
from glitch import hsv
|
||||
|
||||
if __name__ == "__main__":
|
||||
img: Image.Image = Image.open("original.png").convert("RGB")
|
||||
pixel_smear(img, limiter=lambda p: hsv(p)[0] < .85 and hsv(p)[1] < .5, wrap=True)
|
||||
img.save("result.png")
|
Reference in a new issue