Exemplo n.º 1
0
def synthesis(job):
    im, size, topleft, bottomright = getImageCluster(options.lat, options.lon,
                                                     options.deltalat,
                                                     options.deltalon,
                                                     options.zoom)
    filename = 'map.png'
    im.save(filename)
    job.register_file(filename)
    cropim, size, topleft, bottomright = crop(im,
                                              size,
                                              topleft,
                                              bottomright,
                                              options.crop,
                                              resize=options.resize)
    cropim = cropim.convert('LA').convert('RGB')
    cropim = Brightness(cropim).enhance(0.5)
    filename = 'crop.png'
    cropim.save(filename)
    job.register_file(filename)
    return size, topleft, bottomright
Exemplo n.º 2
0
    #f =Image.new(mode="RGBA", size=[1280,720], color=(0xff, 0xff, 0xff, 1))
    f = mai.crop(box=(int(x), int(y), int(x + 1280), int(y + 720)))
    x += deplacement[0]
    y += deplacement[1]
    sz = mai.size[0] * 0.999, mai.size[1] * 0.999
    if i % 5 == 0:
        mai = mai.resize((int(sz[0]), int(sz[1])))
    a = i % (60 * 3)
    if a < 20:
        a = abs(a - 10)
        g = Brightness(f)
        g = g.enhance(a / 10)
        #g.show()
        #g =Image.new(mode="RGBA", size=[1280,720], color=(0x02, 0x02, 0x02, int(0xff-0xff*a/30)))
        #f.paste(g,box=(0,0,1280,720))
        g.save(open("cache/myabout/myabout%04d.png" % i, "bw"))
        continue
    #dr =ImageDraw(f)
    #s,ms =divmod(i,60)
    #dr.text(xy=[10,10], text="%02d:%02d.%04d"%(0,s,ms%60), fill=0)
    #dr.text(xy=[10,30], text="(%02d/%02d)"%(i,total), fill=0)

    f.save(open("cache/myabout/myabout%04d.png" % i, "bw"))
    print("%d/%d" % (i, total))

exit()

frame = Image.open("img/suichu.png")
mario = Image.open("img/mario.png")
awa = Image.open("img/awa.png")
gesso = Image.open("img/gesso.png")