updating extraction scripts
This commit is contained in:
@@ -65,6 +65,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((533, 57, 769, 512))
|
||||
|
||||
# save the image
|
||||
extracted_image.save(f"{output_path}/{filename.split('/')[-1].split('.')[-2]}.png")
|
||||
|
||||
@@ -72,7 +75,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/characters/in/*.*"
|
||||
"image-extraction/images/characters/*.*"
|
||||
):
|
||||
print(image)
|
||||
extract_image(
|
||||
|
||||
Reference in New Issue
Block a user