diff --git a/README.md b/README.md index 4f47191..76e9e16 100644 --- a/README.md +++ b/README.md @@ -15,4 +15,20 @@ Have a look at [requirements.txt](./requirements.txt) Code: [examples/pixel_sort/run.py](./examples/pixel_sort/run.py) -### more examples coming soon... +### pixel_smear + +![](examples/pixel_smear/original.png) ![](examples/pixel_smear/result.png) + +Code: [examples/pixel_smear/run.py](./examples/pixel_smear/run.py) + +### channel_offset + +![](examples/channel_offset/original.png) ![](examples/channel_offset/result.png) + +Code: [examples/channel_offset/run.py](./examples/channel_offset/run.py) + +### led_screen + +![](examples/led_screen/original.png) ![](examples/led_screen/result.png) + +Code: [examples/led_screen/run.py](./examples/led_screen/run.py) diff --git a/examples/channel_offset/original.png b/examples/channel_offset/original.png new file mode 100644 index 0000000..797b4d6 Binary files /dev/null and b/examples/channel_offset/original.png differ diff --git a/examples/channel_offset/result.png b/examples/channel_offset/result.png new file mode 100644 index 0000000..e2c699e Binary files /dev/null and b/examples/channel_offset/result.png differ diff --git a/examples/channel_offset/run.py b/examples/channel_offset/run.py new file mode 100755 index 0000000..ba60ef0 --- /dev/null +++ b/examples/channel_offset/run.py @@ -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") diff --git a/examples/led_screen/original.png b/examples/led_screen/original.png new file mode 100644 index 0000000..97a5671 Binary files /dev/null and b/examples/led_screen/original.png differ diff --git a/examples/led_screen/result.png b/examples/led_screen/result.png new file mode 100644 index 0000000..ad1da82 Binary files /dev/null and b/examples/led_screen/result.png differ diff --git a/examples/led_screen/run.py b/examples/led_screen/run.py new file mode 100755 index 0000000..45d0d01 --- /dev/null +++ b/examples/led_screen/run.py @@ -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") diff --git a/examples/pixel_smear/original.png b/examples/pixel_smear/original.png new file mode 100644 index 0000000..3068048 Binary files /dev/null and b/examples/pixel_smear/original.png differ diff --git a/examples/pixel_smear/result.png b/examples/pixel_smear/result.png new file mode 100644 index 0000000..4399bba Binary files /dev/null and b/examples/pixel_smear/result.png differ diff --git a/examples/pixel_smear/run.py b/examples/pixel_smear/run.py new file mode 100755 index 0000000..ad950a9 --- /dev/null +++ b/examples/pixel_smear/run.py @@ -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")