Warning This repository is no longer maintained. Please use pjsekai-background-gen-rust
Generates PJSekai background image from Image.
pip install pjsekai_background_gen_pillow
from PIL import Image
import pjsekai_background_gen_pillow as pjbg
generator = pjbg.Generator()
generator.generate(Image.open("path/to/image.png")).save("path/to/output.png")
You can run pjsekai_background_gen_pillow
, pjbg
or python -m pjsekai_background_gen_pillow
from command line.
usage: pjsekai_background_gen_pillow [-h] [-b BACKGROUND] [-f FORMAT] base output
Generates PJSekai background image from Image.
positional arguments:
base Base image file path, or "-" for stdin.
output Output image file path, or "-" for stdout.
optional arguments:
-h, --help show this help message and exit
-b BACKGROUND, --background BACKGROUND
Background image file path.
-f FORMAT, --format FORMAT
Output image format.
Generater for background images.
base : PIL.Image
Base background image. Defaults to Built-in background image.
Generate background image from source image.
source : PIL.Image
Source image.
PIL.Image
This library is licensed under GPLv3. test.png
is licensed under CC-BY-SA 4.0.