summaryrefslogtreecommitdiffstatshomepage
path: root/artwork
diff options
context:
space:
mode:
author cgwg <cgwg@users.noreply.github.com>2021-02-21 04:47:28 +0100
committer GitHub <noreply@github.com>2021-02-21 14:47:28 +1100
commit92b292175429c88a0c993636575e662f5844855d (patch)
treead6de6d98a57582bea1a7e50ab43a711548a9e7f /artwork
parent0c20cabef6952635219244793167a3d227e3a1b2 (diff)
bgfx: crt-geom and crt-geom-deluxe enhancements (#7766)
Added a "brightness boost" feature for the shadow mask that works by making the brightness ratio between bright and dark mask pixels closer to 1 for the brighter parts of the image. Added clamping to zero so that underscanning produces a black border. Added a "raster bloom" effect to crt-geom-deluxe that makes the image grow slightly when the average brightness of the screen is high, mimicking a common defect in CRTs.
Diffstat (limited to 'artwork')
-rw-r--r--artwork/bgfx/chains/crt-geom/add_alpha.py33
-rw-r--r--artwork/bgfx/chains/crt-geom/aperture_1_2_bgr.pngbin153 -> 74 bytes
-rw-r--r--artwork/bgfx/chains/crt-geom/aperture_1_4_rgb.pngbin152 -> 78 bytes
-rw-r--r--artwork/bgfx/chains/crt-geom/aperture_2_4_rgb.pngbin159 -> 78 bytes
-rw-r--r--artwork/bgfx/chains/crt-geom/aperture_2_5_bgr.pngbin156 -> 82 bytes
-rw-r--r--artwork/bgfx/chains/crt-geom/aperture_3_6_rgb.pngbin159 -> 82 bytes
-rw-r--r--artwork/bgfx/chains/crt-geom/delta_1_2x1_bgr.pngbin159 -> 83 bytes
-rw-r--r--artwork/bgfx/chains/crt-geom/delta_1_4x1_rgb.pngbin156 -> 87 bytes
-rw-r--r--artwork/bgfx/chains/crt-geom/delta_2_4x1_rgb.pngbin164 -> 86 bytes
-rw-r--r--artwork/bgfx/chains/crt-geom/delta_2_4x2_rgb.pngbin168 -> 91 bytes
-rw-r--r--artwork/bgfx/chains/crt-geom/none.pngbin150 -> 70 bytes
-rw-r--r--artwork/bgfx/chains/crt-geom/slot_2_4x4_rgb.pngbin171 -> 99 bytes
-rw-r--r--artwork/bgfx/chains/crt-geom/slot_2_5x4_bgr.pngbin176 -> 107 bytes
-rw-r--r--artwork/bgfx/chains/crt-geom/slot_3_7x6_rgb.pngbin180 -> 109 bytes
14 files changed, 33 insertions, 0 deletions
diff --git a/artwork/bgfx/chains/crt-geom/add_alpha.py b/artwork/bgfx/chains/crt-geom/add_alpha.py
new file mode 100644
index 00000000000..69fff62f3a6
--- /dev/null
+++ b/artwork/bgfx/chains/crt-geom/add_alpha.py
@@ -0,0 +1,33 @@
+"""
+Assumes the input RGB image subpixels are all either 0 or 255.
+Counts the bright subpixels in the whole image. This should be divisible by 3.
+Creates a uniform alpha channel containing 255 minus 1/3 of
+the number of bright subpixels.
+Writes the RGBA image to the output file.
+"""
+import sys
+import numpy
+import PIL
+import PIL.Image
+
+if len(sys.argv) != 3:
+ print("usage: add_alpha.py in.png out.png")
+ sys.exit(1)
+
+img = PIL.Image.open(sys.argv[1])
+
+arr = numpy.asarray(img)
+count = (arr==255).sum()
+assert count%3 == 0
+count //= 3
+
+alpha = arr[:,:,0,None]*0 + (255-count)
+
+arr = numpy.concatenate((arr,alpha),axis=2)
+
+# DEBUG
+#print(arr)
+
+out = PIL.Image.fromarray(arr)
+out.save(sys.argv[2])
+
diff --git a/artwork/bgfx/chains/crt-geom/aperture_1_2_bgr.png b/artwork/bgfx/chains/crt-geom/aperture_1_2_bgr.png
index 26c49ba1c81..55e9c59e189 100644
--- a/artwork/bgfx/chains/crt-geom/aperture_1_2_bgr.png
+++ b/artwork/bgfx/chains/crt-geom/aperture_1_2_bgr.png
Binary files differ
diff --git a/artwork/bgfx/chains/crt-geom/aperture_1_4_rgb.png b/artwork/bgfx/chains/crt-geom/aperture_1_4_rgb.png
index 1667e2abfac..0a7a5a71ccf 100644
--- a/artwork/bgfx/chains/crt-geom/aperture_1_4_rgb.png
+++ b/artwork/bgfx/chains/crt-geom/aperture_1_4_rgb.png
Binary files differ
diff --git a/artwork/bgfx/chains/crt-geom/aperture_2_4_rgb.png b/artwork/bgfx/chains/crt-geom/aperture_2_4_rgb.png
index a4fce0e92ec..1d2688b1d56 100644
--- a/artwork/bgfx/chains/crt-geom/aperture_2_4_rgb.png
+++ b/artwork/bgfx/chains/crt-geom/aperture_2_4_rgb.png
Binary files differ
diff --git a/artwork/bgfx/chains/crt-geom/aperture_2_5_bgr.png b/artwork/bgfx/chains/crt-geom/aperture_2_5_bgr.png
index 0efddb5bcee..76958863152 100644
--- a/artwork/bgfx/chains/crt-geom/aperture_2_5_bgr.png
+++ b/artwork/bgfx/chains/crt-geom/aperture_2_5_bgr.png
Binary files differ
diff --git a/artwork/bgfx/chains/crt-geom/aperture_3_6_rgb.png b/artwork/bgfx/chains/crt-geom/aperture_3_6_rgb.png
index 8ebbb448786..422db658ca6 100644
--- a/artwork/bgfx/chains/crt-geom/aperture_3_6_rgb.png
+++ b/artwork/bgfx/chains/crt-geom/aperture_3_6_rgb.png
Binary files differ
diff --git a/artwork/bgfx/chains/crt-geom/delta_1_2x1_bgr.png b/artwork/bgfx/chains/crt-geom/delta_1_2x1_bgr.png
index 497ca426474..cead16fd19e 100644
--- a/artwork/bgfx/chains/crt-geom/delta_1_2x1_bgr.png
+++ b/artwork/bgfx/chains/crt-geom/delta_1_2x1_bgr.png
Binary files differ
diff --git a/artwork/bgfx/chains/crt-geom/delta_1_4x1_rgb.png b/artwork/bgfx/chains/crt-geom/delta_1_4x1_rgb.png
index 21144c3b183..0b4f7dc2082 100644
--- a/artwork/bgfx/chains/crt-geom/delta_1_4x1_rgb.png
+++ b/artwork/bgfx/chains/crt-geom/delta_1_4x1_rgb.png
Binary files differ
diff --git a/artwork/bgfx/chains/crt-geom/delta_2_4x1_rgb.png b/artwork/bgfx/chains/crt-geom/delta_2_4x1_rgb.png
index 4a652631940..1d9a174400c 100644
--- a/artwork/bgfx/chains/crt-geom/delta_2_4x1_rgb.png
+++ b/artwork/bgfx/chains/crt-geom/delta_2_4x1_rgb.png
Binary files differ
diff --git a/artwork/bgfx/chains/crt-geom/delta_2_4x2_rgb.png b/artwork/bgfx/chains/crt-geom/delta_2_4x2_rgb.png
index 9cba74f077d..1fa7de380fb 100644
--- a/artwork/bgfx/chains/crt-geom/delta_2_4x2_rgb.png
+++ b/artwork/bgfx/chains/crt-geom/delta_2_4x2_rgb.png
Binary files differ
diff --git a/artwork/bgfx/chains/crt-geom/none.png b/artwork/bgfx/chains/crt-geom/none.png
index 31419a54ac9..dd4c34390ea 100644
--- a/artwork/bgfx/chains/crt-geom/none.png
+++ b/artwork/bgfx/chains/crt-geom/none.png
Binary files differ
diff --git a/artwork/bgfx/chains/crt-geom/slot_2_4x4_rgb.png b/artwork/bgfx/chains/crt-geom/slot_2_4x4_rgb.png
index 695957eab7d..d16ea109d8b 100644
--- a/artwork/bgfx/chains/crt-geom/slot_2_4x4_rgb.png
+++ b/artwork/bgfx/chains/crt-geom/slot_2_4x4_rgb.png
Binary files differ
diff --git a/artwork/bgfx/chains/crt-geom/slot_2_5x4_bgr.png b/artwork/bgfx/chains/crt-geom/slot_2_5x4_bgr.png
index 58d1651bc38..86771a210f9 100644
--- a/artwork/bgfx/chains/crt-geom/slot_2_5x4_bgr.png
+++ b/artwork/bgfx/chains/crt-geom/slot_2_5x4_bgr.png
Binary files differ
diff --git a/artwork/bgfx/chains/crt-geom/slot_3_7x6_rgb.png b/artwork/bgfx/chains/crt-geom/slot_3_7x6_rgb.png
index 86f72a7297a..db8c5f241e6 100644
--- a/artwork/bgfx/chains/crt-geom/slot_3_7x6_rgb.png
+++ b/artwork/bgfx/chains/crt-geom/slot_3_7x6_rgb.png
Binary files differ