Skip to content

ichigo000000/VRChatPNG

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VRChatPNG

Create previews of VRChat avatars and worlds.

VRChatPNG.py

Source

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.

VRChatThumbnail.py

Source

Generates a thumbnail similar to how VRChat avatars are displayed in-game - showing name, author, and supported platforms.

Installation

Python >= 3.9 required.

Update your environment according to requirements.txt

Usage

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 e

License

MIT license, excluding files within the data directory.

File icon from https://icons8.com

Font license

VRChat platform icon by kokorobouzu on booth.pm

About

Create previews of VRChat avatars and worlds.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%