Skip to content

Instantly share code, notes, and snippets.

@Waffle1434
Waffle1434 / equirect_to_cube.py
Last active March 6, 2025 18:09
Convert 360 images to perspective cubemap. Requires py360convert
import argparse, os, sys
from pathlib import Path
from typing import get_args
from PIL import Image
import numpy as np
import py360convert
img_extensions = {".jpg", ".png"}
def ec2_dir(path, fov, size, mode):