Create previews of VRChat avatars and worlds.
Converts VRChat API's JSON response for worlds and avatars into PNG files similar to VRChat's thumbnails - generated using VRChatThumbnail.py.
Also embeds a zip file in the images containing the JSON response at the time of creation and the full-size image used to generate the thumbnail.
Generates a thumbnail similar to how VRChat avatars are displayed in-game - showing name, author, and supported platforms.
Python >= 3.9 required.
Update your environment according to requirements.txt
from PIL import Image
from VRChatThumbnail import VRChatThumbnail
platform = VRChatThumbnail.Platform.PC
# Path to data folder in repo
data_dir: Path = Path("VRChatPNG/data/")
img: Image = VRChatThumbnail.make_thumbnail(
Image.open(...),
platform=platform,
avatar_name="Avatar name",
author_name="Author username",
data_dir=data_dir
)
img.save(...)import VRChatPNG
# Path to JSON file containing VRChat avatar data.
json_path = ...
app = VRChatPNG.App(json_file_path=json_path)
# Recommended to delete generated files on app failure!
# App will fail if folder exists on next run.
try:
app.run()
except Exception as e:
app.delete_floating()
raise eMIT license, excluding files within the data directory.