Just click space it should generate an image basically I want the image to have round corners. Now that I think about it I should have just rounded the corners in Python but what do you think? Also the python to encode image is thats all i believe you need? img = Image.open(f"IMG/{ID}.png") img = img.convert('RGB') list1 = list(img.getdata()) for i in range(len(list1)): pixel_value = rgb_hex(list1[i]) listData.append(str(pixel_value)) file = open(f"TXT/{ID}.txt", "w") file.truncate(0) for i in range(len(listData)): if listData[i - 1] == listData[i] and i != 0: file.write('$') else: file.write(listData[i]) file.close()