Ask coding questions

← Back to all posts
How do I include image data in raw code. (Python)
CrispyYeeto (1)

Although I am not using Replit python, I am curious on how to include image encoding into the code itself. For example, Willards MineKhan uses this method for his Minecraft textures. He stores it in the code in the form of a string:


How can I use this method for creating my own images built into code, but in Python?

And how would I translate this into an actual image to be used?
I want to be able to skew and manipulate the data in the most efficient way possible, without relying on external assets.


use the PIL package for image data.