Это все, что я мог бы подумать о
def partition(list_, indexes):
if indexes[0] != 0:
indexes = [0] + indexes
if indexes[-1] != len(list_):
indexes = indexes + [len(list_)]
return [ list_[a:b] for (a,b) in zip(indexes[:-1], indexes[1:])]
Дано image1.png
с белыми точками при 10,10 & amp; 11,11
convert -size 100x100 xc:black -fill white -draw 'point 10, 10' -draw 'point 11,11' image1.png
И image2.png
с белыми точками @ 5,4
convert -size 100x100 xc:black -fill white -draw 'point 5,4' image2.png
Чтобы объединить их так, как вы описываете, вы бы использовали -compose
с опциями SCREEN
.
composite -compose SCREEN image1.png image2.png result.png