Skip to content

add width, height support to put_image_data  #304

Open
@orena1

Description

Hi,
As far as I can see, there is no way to scale an image when using put_image_data.
e.g.:

from ipycanvas import Canvas
import numpy as np
canvas = Canvas(width=300, height=300)
canvas.put_image_data(np.random.uniform(size=(200,200,3)))
canvas

image

No matter the width and height of the canvas... Which is different from draw_image where there are two other variables (width, height) which scale the image, is it possible to add this feature?

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions