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:

""0g0g70ordrzz0u30g730wa4vzz0xnyl8f11lrk7315qj7jz1fh47pb6553365533033636350335403653650063306333633300635163503655353653535605335031350330553500033033366333433663663535336655335055335553353530355333033503300333336635353663650660554353355635155305303053556333333366353323553060365553063030663533555365534355335530"

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.

Comments
hotnewtop
RYANTADIPARTHI (6017)

use the PIL package for image data.