示例#1
0
def spiral_extra_large(image_path, path, color):
    l1, l2, l3, l4 = levels_by_preview_name(image_path)
    selected_crop = crop_by_preview_name(image_path)

    im = Image.open(selected_crop)
    im = im.resize((1000, 1000), Image.ANTIALIAS)
    im.save(selected_crop)

    sig_scale = 1.0 / 1.39

    spiral.draw(
        selected_crop,  # input
        path,  # output
        3,  # nibsize (line size in output svg)
        color,  # line color
        1.39,  # scaling factor
        l1,
        l2,
        l3,
        l4,  # levels
        2,  # line spacing
        840,
        975,
        0.3  # signature transform
    )
def spiral_pen_a3(image_path, path, color):
    l1, l2, l3, l4 = levels_by_preview_name(image_path)
    selected_crop = crop_by_preview_name(image_path)

    im = Image.open(selected_crop)
    im = im.resize((1000,1000), Image.ANTIALIAS)
    im.save(selected_crop)

    spiral.draw(selected_crop,         # input
            path,                      # output
            3,                         # nibsize (line size in output svg)
            color,                     # line color
            0.21,                      # scaling factor
            l1, l2, l3, l4,            # levels
            2,                         # line spacing
            730,970,0.5               # signature transform
            )
def spiral_small(image_path, path, color):

    l1, l2, l3, l4 = levels_by_preview_name(image_path)
    selected_crop = crop_by_preview_name(image_path)

    im = Image.open(selected_crop)
    im = im.resize((500,500), Image.ANTIALIAS)
    im.save(selected_crop)

    spiral.draw(selected_crop,             # input
                path,                      # output
                4,                         # nibsize (line size in output svg)
                color,                     # line color
                1.00,                      # scaling factor
                l1, l2, l3, l4,            # levels
                3,                         # line spacing
                380,500,0.2                # signature transform
                )
def spiral_extra_large(image_path, path, color):
    l1, l2, l3, l4 = levels_by_preview_name(image_path)
    selected_crop = crop_by_preview_name(image_path)

    im = Image.open(selected_crop)
    im = im.resize((1000,1000), Image.ANTIALIAS)
    im.save(selected_crop)

    sig_scale = 1.0/1.39

    spiral.draw(selected_crop,         # input
            path,                      # output
            3,                         # nibsize (line size in output svg)
            color,                     # line color
            1.39,                      # scaling factor
            l1, l2, l3, l4,            # levels
            2,                         # line spacing
            840, 975, 0.3        # signature transform
            )
示例#5
0
from blackstripes import spiral

spiral.draw(
    "ali.png",  # input
    "ali_spiral.svg",  # output
    2.0,  # nibsize (line size in output svg)
    "#aa0000",  # line color
    0.32,  # scaling factor
    180,
    108,
    180,
    108,  # levels
    2,  # linespacing
    540,
    1021,
    0.7  # signature transform
)
示例#6
0
crossed.draw("image.png",   # input
             "image_crossed.svg",           # output
             2.0,                           # nibsize (line size in output svg)
             "#2200aa",                     # line color
             0.32,                          # scaling factor
             200, 0, 110, 0,                # levels ** just null two invisible layers **
             2,                             # type
             540,1021,0.0                   # signature transform
            )

spiral.draw("image.png",                # input
            "image_spiral.svg",         # output
            2.0 ,                       # nibsize (line size in output svg)
            "#aa0000",                  # line color
            0.32,                       # scaling factor
            180, 108, 180, 108,         # levels
            2,                          # linespacing
            540,1021,0.0                # signature transform
        )

spiral.draw("image.png",                # input
            "image_spiral_round.svg",   # output
            2.0 ,                       # nibsize (line size in output svg)
            "#aa0000",                  # line color
            0.32,                       # scaling factor
            180, 108, 180, 108,         # levels
            2,                          # linespacing
            540,1021,0.0,               # signature transform
            1                           # round shaped drawing if True
        )
from blackstripes import spiral

outputFile = "/mnt/c/Users/Dave"
inputFile = "/mnt/c/Users/Dave"
nibSize = 2
color = "#000000"
scale = 1
levels = [180, 108, 180, 108]
spacing = 2

argv = sys.argv[1:]
opts, args = getopt.getopt(argv, "i:o:n:f:s:l::::p:m:")
for opt, arg in opts:
    if opt == "-i":
        inputFile = inputFile + '/{}'.format(arg)
    if opt == "-o":
        outputFile = outputFile + '/{}'.format(arg)
    if opt == "-n":
        nibSize = int(arg)
    if opt == "-f":
        color = arg
    if opt == "-s":
        scale = float(arg)
    if opt == "-l":
        levels = list(map(int, arg.split(',')))
    if opt == "-p":
        spacing = int(arg)

spiral.draw(inputFile, outputFile, nibSize, color, scale, levels[0], levels[1],
            levels[2], levels[3], spacing, 1024, 1024, 0.1)
from blackstripes import spiral

spiral.draw("ali.png",   # input
            "ali_spiral.svg",           # output
            2.0 ,                       # nibsize (line size in output svg)
            "#aa0000",                  # line color
            0.32,                       # scaling factor
            180, 108, 180, 108,         # levels
            2,                          # linespacing
            540,1021,0.7                # signature transform
            )