Esempio n. 1
0
import os
from assets.objects.PyImEdit import PyImEdit

input_dir = "./assets/images/thumbnailer/images_to_apply_thumbnail/"
output_dir = "./assets/images/thumbnailer/output/"

flashdrive_colors = [
    "red", "green", "blue", "yellow", "megenta", "cyan", "white", "black",
    "gray"
]
thumbnails = ["top_rated_seller", "free_shipping"]
flashdrive = PyImEdit()
flashdrive.set_image_input_dir(input_dir)
flashdrive.set_image_output_dir(output_dir)

thumbnail_name = thumbnails[0]
for color in flashdrive_colors:
    flashdrive_name = "flashdrive_{}.png".format(color)
    flashdrive.load_image(flashdrive_name)
    flashdrive.apply_thumbnail((0, 0), thumbnail_name)
    save_name = "{}_thumbnailed".format(flashdrive.get_image_name())
    flashdrive.save(save_name)
Esempio n. 2
0
from assets.objects.PyImEdit import PyImEdit

image_name = "bell.png"

edit = PyImEdit()
edit.load_image(image_name)
edit.show_loaded_image()
edit.factor_shrink(xfact=2, yfact=6)
edit.show_canvas()
from assets.objects.PyImEdit import PyImEdit

input_dir = "./assets/images/super_compose/me/output/"
output_dir = "./assets/images/super_compose/me/output/"

image_name = "LH_super_compose_shiroe50scale5.png"
save_name = "{}black_and_white".format(image_name)

pyim = PyImEdit()
pyim.set_input_dir(input_dir)
pyim.set_output_dir(output_dir)
pyim.load_image(image_name)
pyim.grayscale(method=0)

pyim.save(save_name)
Esempio n. 4
0
from assets.objects.PyImEdit import PyImEdit

input_dir = "./assets/images/super_compose/me/log_horizon/"
output_dir = "./assets/images/super_compose/me/output/"
palettes_dir = "./assets/images/super_compose/palettes/"
palette_name = "space_pics"

image_name = "akatsuki.png"
pyim = PyImEdit()
pyim.set_input_dir(input_dir)
pyim.set_output_dir(output_dir)
pyim.load_image(image_name)

save_name = "{}_{}".format(pyim.get_image_name(), "other_super_compose")
pyim.other_super_compose(palette_name)
pyim.save(save_name)

Esempio n. 5
0
import sys, os
from assets.objects.PyImEdit import PyImEdit

input_dir = "./assets/images/test/"
output_dir = "./assets/images/test/rotate/"
image_name = "bell.png"
pyim = PyImEdit()
pyim.set_input_dir(input_dir)
pyim.set_output_dir(output_dir)
pyim.load_image(image_name)

"""
for i in range(360):
    pyim.rotate(degrees=i)
    save_name = "{}{}".format(pyim.get_image_name(), str(i).zfill(3))
    pyim.save(save_name)"""

pyim.flip()
pyim.show()
Esempio n. 6
0
from assets.objects.PyImEdit import PyImEdit

input_dir = "./assets/images/super_compose/taneka/"
output_dir = "./assets/images/super_compose/taneka/output/"
palettes_dir = "./assets/images/super_compose/palettes/"
palette_name = "taneka_family"
palette_pixel_size = 50
images = [
    "taneka1.png", "taneka2.png", "taneka3.png", "taneka4.png", "taneka5.png",
    "taneka6.png"
]

pyim = PyImEdit()
pyim.set_input_dir(input_dir)
pyim.set_output_dir(output_dir)
pyim.load_image_palette(palette_name, palette_pixel_size=palette_pixel_size)

for image_name in images:
    pyim.load_image(image_name)
    pyim.super_compose(palette_pixel_size)
    save_name = "{}_{}".format(pyim.get_image_name(), "super_compose")
    pyim.save(save_name)