Skip to content

Instantly share code, notes, and snippets.

View TheColdPot's full-sized avatar

TheColdPot TheColdPot

  • Chengdu, Sichuan, China
  • 23:38 (UTC +08:00)
View GitHub Profile
import numpy as np
from PIL import Image
# --- 基础数学工具 ---
def normalize(v):
norm = np.linalg.norm(v)
return v / norm if norm > 0 else v
def look_at(eye, target, up):
z_axis = normalize(eye - target)
@TheColdPot
TheColdPot / main.py
Created January 21, 2023 08:02
A simple program to connect your images together vertically
import os
from PIL import Image
from os import listdir
import math
pics = listdir('./pic')
final_width = None
for pic in pics:
i = Image.open(f'./pic/{pic}')