Example #1
0
def classic_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

    crossed.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,  # type
        840,
        975,
        0.3  # signature transform
    )
def classic_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)

    crossed.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
            1,                      # type 
            730,970,0.5          # signature transform
            )
def classic_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

    crossed.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,                      # type
            840, 975, 0.3       # signature transform
            )
from blackstripes import crossed

print("Running")

IMAGE = "IMG_1257"

crossed.draw(
    "./images/" + IMAGE + ".png",       # input file
    "./output.svg",                     # output file
    1.0,                                # nibsize
    "#333333",                          # line color
    1,                                  # scale
    200, 150, 100, 50,                  # levels
    1,                                  # type
    540, 1021, 0.7                      # signature transform
)

Example #5
0
from blackstripes import spiral
from blackstripes import crossed

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
from blackstripes import crossed

crossed.draw("ali.png",   # input
            "ali_crossed.svg",           # output
            2.0,                      # nibsize (line size in output svg)
            "#2200aa",              # line color
            0.32,                   # scaling factor
            200, 146, 110, 56,      # levels
            2,                      # type
            540,1021,0.7            # signature transform
            )

Example #7
0
from blackstripes import crossed

crossed.draw(
    "ali.png",  # input
    "ali_crossed.svg",  # output
    2.0,  # nibsize (line size in output svg)
    "#2200aa",  # line color
    0.32,  # scaling factor
    200,
    146,
    110,
    56,  # levels
    2,  # type
    540,
    1021,
    0.7  # signature transform
)
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)                         
                                                           
crossed.draw(inputFile,                                     
            outputFile,                                    
            nibSize,                                       
            color,                                         
            scale,                                         
            levels[0],levels[1],levels[2],levels[3],       
            spacing,                                       
            0,0,0.0                                  
)