mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
More work on automatic map creation
This commit is contained in:
@@ -1,12 +1,20 @@
|
||||
import os
|
||||
from PIL import Image
|
||||
import concurrent.futures
|
||||
import math
|
||||
|
||||
# correction parameters
|
||||
|
||||
# NTTR
|
||||
rotation = math.degrees(0.01895)
|
||||
scale = 0.973384
|
||||
|
||||
zoom = 16
|
||||
path = "output"
|
||||
|
||||
def crop_image(filename):
|
||||
img = Image.open(os.path.join(path, filename))
|
||||
img = Image.open(os.path.join(path, filename)).rotate(-rotation)
|
||||
img = img.resize((math.floor(img.width * scale), math.floor(img.height * scale)))
|
||||
center_X, center_Y = filename.removesuffix(".png").split("_")
|
||||
center_X = int(center_X)
|
||||
center_Y = int(center_Y)
|
||||
|
||||
Reference in New Issue
Block a user