Skip to content

Commit c222ef1

Browse files
committed
Swap out sampling method
1 parent 5e0cf76 commit c222ef1

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/main_gui.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
from typing import List
66

77
from PIL import Image, ImageTk, ImageOps
8-
from PIL.Image import Dither
98
import PySimpleGUI as sg
109

1110
from mesh_generating_utils import create_mesh
@@ -124,7 +123,7 @@ def build_layout(self) -> List[List[sg.Element]]:
124123
def get_img_data(self, image_path: str, maxsize=(500, 500), first=False):
125124
""" Generate image data using PIL """
126125
img = Image.open(image_path)
127-
img = ImageOps.contain(img, maxsize, Dither.NONE)
126+
img = ImageOps.contain(img, maxsize, Image.NEAREST)
128127
if first:
129128
bio = io.BytesIO()
130129
img.save(bio, format="PNG")

0 commit comments

Comments
 (0)