ParthJadhav / Tkinter-Designer

An easy and fast way to create a Python GUI 🐍
BSD 3-Clause "New" or "Revised" License
8.63k stars 794 forks source link

Figma frame not correctly being converted to Tkinter gui #365

Open Autimatisch opened 8 months ago

Autimatisch commented 8 months ago

result after using TkinterDesigner (GUI) results

x0bi3 commented 8 months ago

I believe I figured it out! Despite the instructions saying "PIL" shouldn't be in the same directory as Pillow, it turns out it can still work (and the problem you're having disappeared).

I was contantly getting these errors: Exception("Frame not found in figma file or is empty") Exception: Frame not found in figma file or is empty

and im = im.resize((im.size[0] // 2, im.size[1] // 2), Image.ANTIALIAS)

AttributeError: module 'PIL.Image' has no attribute 'ANTIALIAS'

So what I did was... I went into my TKDesigner directory and found the "utils.py" file in the "tkdesigner" folder. I opened up the file with notepade and changed this line: "im = im.resize((im.size[0] // 2, im.size[1] // 2), Image.ANTIALIAS)"

to

"im = im.resize((im.size[0] // 2, im.size[1] // 2), Image.LANCZOS)"

I restarted the programs and it went through just fine!

Edit: I may have jumped the gun... While it is functional, the design was absolutely obliterated

Autimatisch commented 7 months ago

Hi X0bi3,

I modified the line in utils.py and accessed gui.py to input my Figma details. However, the results remain unchanged. If you're willing, I can privately share my link and token with you for testing purposes.