High-res textures for all rooms, special floors, walls, bridges, outdoors and objects; reinforced wall as castle masonry in both styles
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
da40b0875e
commit
2e905fe374
279 files changed
+307
-35
No files matched your search
+4
-2
@@ -6,7 +6,8 @@ alpha made hard (pixels are either there or not, like the rest of the pixel art)
|
||||
Usage:
|
||||
make_decal.py raw.png out_prefix --size 128 [--gray]
|
||||
|
||||
--gray neutral grey (a dark crack whose lines took on the magenta of the background)
|
||||
--gray neutral grey (a dark crack whose lines took on the magenta of the background)
|
||||
--strict key out only nearly pure magenta (for pink or red pictures)
|
||||
|
||||
Writes out_prefix-<size>.png and out_prefix-<size>-preview.png (on a grey floor, scaled up 3x).
|
||||
Needs Pillow.
|
||||
@@ -22,6 +23,7 @@ def main():
|
||||
ap.add_argument("out")
|
||||
ap.add_argument("--size", type=int, default=128)
|
||||
ap.add_argument("--gray", action="store_true")
|
||||
ap.add_argument("--strict", action="store_true")
|
||||
a = ap.parse_args()
|
||||
|
||||
img = Image.open(a.raw).convert("RGBA")
|
||||
@@ -29,7 +31,7 @@ def main():
|
||||
for y in range(img.height):
|
||||
for x in range(img.width):
|
||||
r, g, b, _ = px[x, y]
|
||||
if r > g + 40 and b > g + 40:
|
||||
if (r > 200 and b > 200 and g < 90) if a.strict else (r > g + 40 and b > g + 40):
|
||||
px[x, y] = (0, 0, 0, 0)
|
||||
# premultiplied scaling: transparent pixels add nothing to the colour
|
||||
small = img.resize((a.size, a.size), Image.BOX)
|
||||
|
||||
Reference in new issue
Block a user