with Drawing() as draw:
draw.stroke_color = Color('black')
draw.stroke_width = 2
draw.line((50, 50), (40, 20))
with Image(width=150, height=100, background=Color('lightblue')) as image:
draw(image)
image_arr = np.array(image)
assert (image.height, image.width) == image_arr.shape[:2]
This small snippet fails as the width and height are different. If we set them to be the same there are no issues, and the image_arr looks like it should.
The text was updated successfully, but these errors were encountered:
This small snippet fails as the width and height are different. If we set them to be the same there are no issues, and the
image_arr
looks like it should.The text was updated successfully, but these errors were encountered: