Skip to main content

Build up image by jointing images

Project description

ImageJointer

Build up image by jointing images

install

pip install image_jointer

how to use

    from image_jointer import JointAlign, ImageJointer
    from PIL import Image
    
    red = Image.new("RGBA", (100, 100), (255, 0, 0))
    green = Image.new("RGBA", (100, 100), (0, 255, 0))
    blue = Image.new("RGBA", (100, 100), (0, 0, 255))

    jointed = (
        ImageJointer(red)
        .joint(green, JointAlign.SIDE_CENTER)
        .joint(
            ImageJointer(blue).joint(blue, JointAlign.SIDE_CENTER),
            JointAlign.UNDER_LEFT
        )
    )
    joint_img = jointed.to_image()

simple

    from image_jointer import JointAlign, ImageJointer
    from PIL import Image    

    red = Image.new("RGBA", (100, 100), (255, 0, 0))
    blank = Blank(50, 100)
    green = Image.new("RGBA", (100, 100), (0, 255, 0))

    jointed = (
        ImageJointer(red)
        .joint(blank, JointAlign.SIDE_CENTER)
        .joint(green, JointAlign.SIDE_CENTER)
    )
    joint_img = jointed.to_image()

blank

    from image_jointer import JointAlign, ImageJointer
    from PIL import Image

    red = Image.new("RGBA", (100, 100), (255, 0, 0))
    blue = Image.new("RGBA", (100, 200), (0, 0, 255))

    jointed = ImageJointer(red).joint(blue, JointAlign.SIDE_CENTER)
    joint_img = jointed.to_image()

side_center

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

image_jointer-2.0.tar.gz (7.3 kB view hashes)

Uploaded Source

Built Distribution

image_jointer-2.0-py3-none-any.whl (7.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page