This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse | |
from PIL import Image | |
import cairosvg | |
import os | |
import base64 | |
def add_watermark(image_path, text, x, y, output_path): | |
""" | |
在图片左上角添加水印文字 | |
:param image_path: 输入图片路径 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import '../../gameScripts/pixi/performs/cherryBlossoms'; | |
import '../../gameScripts/pixi/performs/rain'; | |
import '../../gameScripts/pixi/performs/snow'; | |
import '../../gameScripts/pixi/performs/sekai'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from fastapi import FastAPI, Depends, BackgroundTasks, Request | |
from typing import Annotated, AsyncIterator | |
from pydantic import BaseModel, Field | |
from uuid import uuid4 | |
from contextlib import asynccontextmanager | |
import random | |
import asyncio | |
app = FastAPI() |