Last active
November 10, 2022 09:46
-
-
Save WiggleWizard/59baba25b26fb7aee080377a15071f03 to your computer and use it in GitHub Desktop.
Packs UE world partition exports of 32-bit heightmap data into a single 32-bit image
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PIL import Image | |
import glob, os | |
# Size of each partition image | |
in_size = 504 | |
# How many partitions there are per axis | |
x_count = 11 | |
y_count = 11 | |
final_size = (in_size * x_count, in_size * y_count) | |
final_out = Image.new(mode = "I", size = final_size) | |
for x in range(0, x_count + 1): | |
for y in range(0, y_count + 1): | |
filename = "Map_x" + str(x) + "_y" + str(y) + ".png" | |
with Image.open(filename) as im: | |
print(filename) | |
final_out.paste(im, (x * in_size, y * in_size)) | |
print("Final Size: " + str(final_size)) | |
final_out.save("Final Output.png") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment