updating extraction scripts
This commit is contained in:
@@ -81,6 +81,9 @@ def extract_image(filename: str, output_path: str) -> None:
|
||||
# convert back to an image
|
||||
extracted_image = Image.fromarray(extracted_image_array, "RGBA")
|
||||
|
||||
# crop
|
||||
extracted_image = extracted_image.crop((490, 42, 803, 568))
|
||||
|
||||
# save the image
|
||||
extracted_image.save(f"{output_path}/{filename.split('/')[-1].split('.')[-2]}.png")
|
||||
|
||||
@@ -88,7 +91,7 @@ def extract_image(filename: str, output_path: str) -> None:
|
||||
if __name__ == "__main__":
|
||||
for image in glob.glob(
|
||||
"/Users/dtomlinson/git-repos/web-dev/onmyoji-deck-builder/."
|
||||
"image-extraction/images/fields/in/*.*"
|
||||
"image-extraction/images/fields/*.*"
|
||||
):
|
||||
print(image)
|
||||
extract_image(
|
||||
|
||||
Reference in New Issue
Block a user