A lightweight Python library for rendering Minecraft player skins as:
- 2D static images
- 3D-style rotating animations in GIF format
- OpenGL-based generated previews using the skin texture directly
This project is useful for creating profile previews, skin showcases, Discord/website assets, and animated Minecraft skin cards.
- Load the Minecraft skin texture from a URL
- Accept 64x64 and 128x128 skin textures
- Render a static PNG image
- Render a rotating animated GIF
- Uses OpenGL via
modernglfor fast 3D-style rendering - Simple Python API for quick integration
Install from PyPI:
pip install minecraft-skin-rendererFor local development:
git clone https://github.com/GitTroyer/Minecraft-Skin-Renderer.git
cd Minecraft-Skin-Renderer- Python 3.9+
- numpy
- requests
- Pillow
- moderngl
- termcolor
These dependencies are automatically installed when you install the package properly.
from minecraft_skin_renderer import render_skin_image, render_skin_gif
import os
skin_url="http://textures.minecraft.net/texture/75eb993fa75e1ef66cdb432c484850e8e1b32af07293014e06665ba0ac32a3ad"
os.makedirs("renders", exist_ok=True)
render_skin_image(
skin_url=skin_url,
output_path="renders/skin_render.png",
width=512,
height=512,
)
render_skin_gif(
skin_url=skin_url,
output_path="renders/skin_animation.gif",
width=512,
height=512,
num_frames=120,
fps=30,
)Render a single skin preview as a PNG image.
Parameters:
skin_url: URL of the Minecraft skin image (64x64 or 128x128)output_path: Destination file path for the output PNGwidth: Output width in pixelsheight: Output height in pixels
Returns:
- The output path as a string
render_skin_gif(skin_url: str, output_path: str, width: int = 512, height: int = 512, num_frames: int = 120, fps: int = 30) -> str
Render a full 360-degree animated preview of the skin as a GIF.
Parameters:
skin_url: URL of the Minecraft skin imageoutput_path: Output GIF pathwidth: GIF width in pixelsheight: GIF height in pixelsnum_frames: Total number of frames in the animationfps: Frames per second
Returns:
- The generated GIF path
The library creates images like this:
The default example uses a Minecraft skin texture URL and saves it to the renders/ directory.
The renderer supports:
- 64x64 skins
- 128x128 skins automatically resized to the standard 64x64 format for rendering
If the image is not in a compatible format, the library raises a ValueError.
This project is designed to be easy to extend. You can add:
- custom lighting
- different camera angles
- pose presets
- CLI arguments
- support for custom output formats
Contributions are welcome. If you want to improve the rendering quality, fix compatibility issues, or add new features, feel free to open a pull request or issue.
- PyPI package: on it
- GitHub repository: https://github.com/GitTroyer/Minecraft-Skin-Renderer
- Pull requests: https://github.com/GitTroyer/Minecraft-Skin-Renderer/pulls
- Issues: https://github.com/GitTroyer/Minecraft-Skin-Renderer/issues
This project is distributed under the MIT license unless otherwise noted.


