--- title: image keywords: fastai sidebar: home_sidebar summary: "API details." description: "API details." nb_path: "nbs/01_image.ipynb" ---
{% raw %}
{% endraw %} {% raw %}
{% endraw %} {% raw %}
{% endraw %} {% raw %}

read_image[source]

read_image(path:str, channels:int=3)

Reads an image file from the path and return the rgb image in tf.Tensor format.

{% endraw %} {% raw %}

resize_image[source]

resize_image(image:Tensor, size:Union[Tensor, tuple], **kwargs)

Resize image to the target size: Union[tf.Tensor, tuple]

{% endraw %} {% raw %}
{% endraw %} {% raw %}

class Chitra[source]

Chitra(data, *args, **kwargs)

An ultimate class for Image

{% endraw %} {% raw %}
{% endraw %} {% raw %}
url = "https://upload.wikimedia.org/wikipedia/commons/thumb/b/b6/Image_created_with_a_mobile_phone.png/1200px-Image_created_with_a_mobile_phone.png"
image = url_to_image(url)
image = image.resize((224, 224))
{% endraw %} {% raw %}
cimage = Chitra(url)
{% endraw %} {% raw %}
cimage.imshow()
{% endraw %}