Skip to content

Commit

Permalink
Swap out sampling method
Browse files Browse the repository at this point in the history
  • Loading branch information
Joeydelarago committed Jul 11, 2022
1 parent 5e0cf76 commit c222ef1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/main_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from typing import List

from PIL import Image, ImageTk, ImageOps
from PIL.Image import Dither
import PySimpleGUI as sg

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

0 comments on commit c222ef1

Please sign in to comment.