Tkinter-Designer icon indicating copy to clipboard operation
Tkinter-Designer copied to clipboard

Figma frame not correctly being converted to Tkinter gui

Open Autimatisch opened this issue 1 year ago • 2 comments

  • Briefly describe the bug Its probably my own fault, but my figma design is not correctly being converted to a tkinter gui

  • Operating System Tested on Windows 11 newest build and Windows 10 22h2

  • What is the expected behavior? Please see the attachment Expected/designed expected

result after using TkinterDesigner (GUI) results

Autimatisch avatar Nov 04 '23 13:11 Autimatisch

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

x0bi3 avatar Nov 10 '23 19:11 x0bi3

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.

Autimatisch avatar Nov 16 '23 11:11 Autimatisch