Voronoi diagram: Difference between revisions

Content added Content deleted
Line 2,151: Line 2,151:
# Export an RGB image
# Export an RGB image
rgb = colors[labels]
rgb = colors[labels]
Image.fromarray(rgb, mode='RGB').save('VoronoiDiagram.png', 'PNG')
img = Image.fromarray(rgb, mode='RGB')
img.save('VoronoiDiagram.png', 'PNG')
img.show()
return rgb
return rgb
</syntaxhighlight>
</syntaxhighlight>