Skip to content

Commit 954b221

Browse files
committed
Fix resolution crash. Improve palette handling
1 parent dd51eac commit 954b221

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

rct-graphics-helper/processors/frame_processors/post_processor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ def _get_output_info_from_results(self, result, output_index, output_path):
166166

167167
if result[2:][:-1] is not "":
168168
offset_coords = result[2:][:-1].split(" ")
169-
output.offset_x = int(offset_coords[0])
170-
output.offset_y = int(offset_coords[1]) + 15
169+
output.offset_x = int(round(float(offset_coords[0])))
170+
output.offset_y = int(round(float(offset_coords[1]))) + 15
171171

172172
return output

rct-graphics-helper/processors/render_task_processor.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ def get_index(output_info):
191191
image_dict["path"] = os.path.basename(output_info.path)
192192
image_dict["x"] = output_info.offset_x
193193
image_dict["y"] = output_info.offset_y
194-
image_dict["format"] = "raw"
194+
image_dict["format"] = "keep"
195195

196196
images[output_info.index] = image_dict
197197

@@ -243,6 +243,9 @@ def _generate_parkobj(self, task, info, copy_to_objects):
243243

244244
for image in info.get("images"):
245245

246+
if isinstance(image, str):
247+
continue
248+
246249
image_file = os.path.join(file_path, image.get("path"))
247250

248251
if not os.path.exists(image_file):
190 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)