# lv_image.h (/api/public/widgets/lv_image_h)



<RelatedHeaders name="lv_image_private.h" isPrivate="false" />

<ApiSummary functions="32" enums="2" macros="1" variables="1" />

Functions [#functions]

<ApiTabs items="[&#x22;Setters (14)&#x22;,&#x22;Getters (16)&#x22;,&#x22;Other (2)&#x22;]">
  <ApiTab value="Setters (14)">
    <ApiMember kind="function" name="lv_image_set_src" file="public/widgets/lv_image.h" line="98" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/lv_image.h#L98">
      lv_image_set_src [#lv_image_set_src]

      Set the image data to display on the object

      ```c title=" " lineNumbers=1
      void lv_image_set_src(lv_obj_t *obj, const void *src)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                             | Description                                                                                                                                                                                                                                                     |
      | ----- | ------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to an image object                                                                                                                                                                                                                                      |
      | `src` | `const void *`                                   | 1) pointer to an <ApiLink name="lv_image_dsc_t" /> descriptor (converted by LVGL's image converter) (e.g. \&my\_img) or 2) path to an image file (e.g. "S:/dir/img.bin")or 3) a SYMBOL (e.g. LV\_SYMBOL\_OK) **May** be `NULL`. When NULL the image is cleared. |
    </ApiMember>

    <ApiMember kind="function" name="lv_image_set_offset_x" file="public/widgets/lv_image.h" line="105" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/lv_image.h#L105">
      lv_image_set_offset_x [#lv_image_set_offset_x]

      Set an offset for the source of an image so the image will be displayed from the new origin.

      ```c title=" " lineNumbers=1
      void lv_image_set_offset_x(lv_obj_t *obj, int32_t x)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                             | Description                  |
      | ----- | ------------------------------------------------ | ---------------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to an image          |
      | `x`   | `int32_t`                                        | the new offset along x axis. |
    </ApiMember>

    <ApiMember kind="function" name="lv_image_set_offset_y" file="public/widgets/lv_image.h" line="113" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/lv_image.h#L113">
      lv_image_set_offset_y [#lv_image_set_offset_y]

      Set an offset for the source of an image. so the image will be displayed from the new origin.

      ```c title=" " lineNumbers=1
      void lv_image_set_offset_y(lv_obj_t *obj, int32_t y)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                             | Description                  |
      | ----- | ------------------------------------------------ | ---------------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to an image          |
      | `y`   | `int32_t`                                        | the new offset along y axis. |
    </ApiMember>

    <ApiMember kind="function" name="lv_image_set_rotation" file="public/widgets/lv_image.h" line="125" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/lv_image.h#L125">
      lv_image_set_rotation [#lv_image_set_rotation]

      Set the rotation angle of the image. The image will be rotated around the set pivot set by <ApiLink name="lv_image_set_pivot" display="lv_image_set_pivot()" /> Note that indexed and alpha only images can't be transformed.

      ```c title=" " lineNumbers=1
      void lv_image_set_rotation(lv_obj_t *obj, int32_t angle)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name    | Type                                             | Description                                                         |
      | ------- | ------------------------------------------------ | ------------------------------------------------------------------- |
      | `obj`   | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to an image object                                          |
      | `angle` | `int32_t`                                        | rotation in degree with 0.1 degree resolution (0..3600: clock wise) |

      <Callout type="info">
        if image\_align is `LV_IMAGE_ALIGN_STRETCH` or `LV_IMAGE_ALIGN_FIT` rotation will be set to 0 automatically.
      </Callout>
    </ApiMember>

    <ApiMember kind="function" name="lv_image_set_pivot" file="public/widgets/lv_image.h" line="135" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/lv_image.h#L135">
      lv_image_set_pivot [#lv_image_set_pivot]

      Set the rotation center of the image. The image will be rotated around this point. x, y can be set with value of LV\_PCT, lv\_image\_get\_pivot will return the true pixel coordinate of pivot in this case.

      ```c title=" " lineNumbers=1
      void lv_image_set_pivot(lv_obj_t *obj, int32_t x, int32_t y)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                             | Description                    |
      | ----- | ------------------------------------------------ | ------------------------------ |
      | `obj` | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to an image object     |
      | `x`   | `int32_t`                                        | rotation center x of the image |
      | `y`   | `int32_t`                                        | rotation center y of the image |
    </ApiMember>

    <ApiMember kind="function" name="lv_image_set_pivot_x" file="public/widgets/lv_image.h" line="142" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/lv_image.h#L142">
      lv_image_set_pivot_x [#lv_image_set_pivot_x]

      Set the rotation horizontal center of the image.

      ```c title=" " lineNumbers=1
      void lv_image_set_pivot_x(lv_obj_t *obj, int32_t x)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                             | Description                                                                     |
      | ----- | ------------------------------------------------ | ------------------------------------------------------------------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to an image object                                                      |
      | `x`   | `int32_t`                                        | rotation center x of the image, or <ApiLink name="lv_pct" display="lv_pct()" /> |
    </ApiMember>

    <ApiMember kind="function" name="lv_image_set_pivot_y" file="public/widgets/lv_image.h" line="149" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/lv_image.h#L149">
      lv_image_set_pivot_y [#lv_image_set_pivot_y]

      Set the rotation vertical center of the image.

      ```c title=" " lineNumbers=1
      void lv_image_set_pivot_y(lv_obj_t *obj, int32_t y)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                             | Description                                                                     |
      | ----- | ------------------------------------------------ | ------------------------------------------------------------------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to an image object                                                      |
      | `y`   | `int32_t`                                        | rotation center y of the image, or <ApiLink name="lv_pct" display="lv_pct()" /> |
    </ApiMember>

    <ApiMember kind="function" name="lv_image_set_scale" file="public/widgets/lv_image.h" line="162" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/lv_image.h#L162">
      lv_image_set_scale [#lv_image_set_scale]

      Set the zoom factor of the image. Note that indexed and alpha only images can't be transformed.

      ```c title=" " lineNumbers=1
      void lv_image_set_scale(lv_obj_t *obj, uint32_t zoom)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name   | Type                                             | Description                                                                                                                                                          |
      | ------ | ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
      | `obj`  | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to an image object                                                                                                                                           |
      | `zoom` | `uint32_t`                                       | the zoom factor. Example values:<br />- 256 or LV\_SCALE\_NONE: no zoom<br />- \<256: scale down<br />- >256: scale up<br />- 128: half size<br />- 512: double size |
    </ApiMember>

    <ApiMember kind="function" name="lv_image_set_scale_x" file="public/widgets/lv_image.h" line="175" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/lv_image.h#L175">
      lv_image_set_scale_x [#lv_image_set_scale_x]

      Set the horizontal zoom factor of the image. Note that indexed and alpha only images can't be transformed.

      ```c title=" " lineNumbers=1
      void lv_image_set_scale_x(lv_obj_t *obj, uint32_t zoom)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name   | Type                                             | Description                                                                                                                                                          |
      | ------ | ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
      | `obj`  | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to an image object                                                                                                                                           |
      | `zoom` | `uint32_t`                                       | the zoom factor. Example values:<br />- 256 or LV\_SCALE\_NONE: no zoom<br />- \<256: scale down<br />- >256: scale up<br />- 128: half size<br />- 512: double size |
    </ApiMember>

    <ApiMember kind="function" name="lv_image_set_scale_y" file="public/widgets/lv_image.h" line="188" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/lv_image.h#L188">
      lv_image_set_scale_y [#lv_image_set_scale_y]

      Set the vertical zoom factor of the image. Note that indexed and alpha only images can't be transformed.

      ```c title=" " lineNumbers=1
      void lv_image_set_scale_y(lv_obj_t *obj, uint32_t zoom)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name   | Type                                             | Description                                                                                                                                                          |
      | ------ | ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
      | `obj`  | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to an image object                                                                                                                                           |
      | `zoom` | `uint32_t`                                       | the zoom factor. Example values:<br />- 256 or LV\_SCALE\_NONE: no zoom<br />- \<256: scale down<br />- >256: scale up<br />- 128: half size<br />- 512: double size |
    </ApiMember>

    <ApiMember kind="function" name="lv_image_set_blend_mode" file="public/widgets/lv_image.h" line="195" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/lv_image.h#L195">
      lv_image_set_blend_mode [#lv_image_set_blend_mode]

      Set the blend mode of an image.

      ```c title=" " lineNumbers=1
      void lv_image_set_blend_mode(lv_obj_t *obj, lv_blend_mode_t blend_mode)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name         | Type                                             | Description                |
      | ------------ | ------------------------------------------------ | -------------------------- |
      | `obj`        | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to an image object |
      | `blend_mode` | <ApiLink name="lv_blend_mode_t" />               | the new blend mode         |
    </ApiMember>

    <ApiMember kind="function" name="lv_image_set_antialias" file="public/widgets/lv_image.h" line="203" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/lv_image.h#L203">
      lv_image_set_antialias [#lv_image_set_antialias]

      Enable/disable anti-aliasing for the transformations (rotate, zoom) or not. The quality is better with anti-aliasing looks better but slower.

      ```c title=" " lineNumbers=1
      void lv_image_set_antialias(lv_obj_t *obj, bool antialias)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name        | Type                                             | Description                                 |
      | ----------- | ------------------------------------------------ | ------------------------------------------- |
      | `obj`       | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to an image object                  |
      | `antialias` | `bool`                                           | true: anti-aliased; false: not anti-aliased |
    </ApiMember>

    <ApiMember kind="function" name="lv_image_set_inner_align" file="public/widgets/lv_image.h" line="212" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/lv_image.h#L212">
      lv_image_set_inner_align [#lv_image_set_inner_align]

      Set the image object size mode.

      ```c title=" " lineNumbers=1
      void lv_image_set_inner_align(lv_obj_t *obj, lv_image_align_t align)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name    | Type                                             | Description                |
      | ------- | ------------------------------------------------ | -------------------------- |
      | `obj`   | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to an image object |
      | `align` | <ApiLink name="lv_image_align_t" />              | the new align mode.        |

      <Callout type="info">
        if image\_align is `LV_IMAGE_ALIGN_STRETCH` or `LV_IMAGE_ALIGN_FIT` rotation, scale and pivot will be overwritten and controlled internally.
      </Callout>
    </ApiMember>

    <ApiMember kind="function" name="lv_image_set_bitmap_map_src" file="public/widgets/lv_image.h" line="220" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/lv_image.h#L220">
      lv_image_set_bitmap_map_src [#lv_image_set_bitmap_map_src]

      Set an A8 bitmap mask for the image.

      ```c title=" " lineNumbers=1
      void lv_image_set_bitmap_map_src(lv_obj_t *obj, const lv_image_dsc_t *src)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                                               | Description                                                                                                       |
      | ----- | ------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="lv_obj_t *" />                   | pointer to an image object                                                                                        |
      | `src` | <ApiLink name="lv_image_dsc_t" display="const lv_image_dsc_t *" /> | an <ApiLink name="lv_image_dsc_t" /> bitmap mask source. **May** be `NULL`. When NULL the bitmap mask is removed. |
    </ApiMember>
  </ApiTab>

  <ApiTab value="Getters (16)">
    <ApiMember kind="function" name="lv_image_get_src" file="public/widgets/lv_image.h" line="231" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/lv_image.h#L231">
      lv_image_get_src [#lv_image_get_src]

      Get the source of the image

      ```c title=" " lineNumbers=1
      const void * lv_image_get_src(lv_obj_t *obj)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                             | Description                |
      | ----- | ------------------------------------------------ | -------------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to an image object |

      **Returns:** `const void *` — the image source (symbol, file name or <ApiLink name="lv_image_dsc_t" /> for C arrays)
    </ApiMember>

    <ApiMember kind="function" name="lv_image_get_offset_x" file="public/widgets/lv_image.h" line="238" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/lv_image.h#L238">
      lv_image_get_offset_x [#lv_image_get_offset_x]

      Get the offset's x attribute of the image object.

      ```c title=" " lineNumbers=1
      int32_t lv_image_get_offset_x(lv_obj_t *obj)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                             | Description         |
      | ----- | ------------------------------------------------ | ------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to an image |

      **Returns:** `int32_t` — offset X value.
    </ApiMember>

    <ApiMember kind="function" name="lv_image_get_offset_y" file="public/widgets/lv_image.h" line="245" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/lv_image.h#L245">
      lv_image_get_offset_y [#lv_image_get_offset_y]

      Get the offset's y attribute of the image object.

      ```c title=" " lineNumbers=1
      int32_t lv_image_get_offset_y(lv_obj_t *obj)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                             | Description         |
      | ----- | ------------------------------------------------ | ------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to an image |

      **Returns:** `int32_t` — offset Y value.
    </ApiMember>

    <ApiMember kind="function" name="lv_image_get_rotation" file="public/widgets/lv_image.h" line="254" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/lv_image.h#L254">
      lv_image_get_rotation [#lv_image_get_rotation]

      Get the rotation of the image.

      ```c title=" " lineNumbers=1
      int32_t lv_image_get_rotation(lv_obj_t *obj)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                             | Description                |
      | ----- | ------------------------------------------------ | -------------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to an image object |

      **Returns:** `int32_t` — rotation in 0.1 degrees (0..3600)

      <Callout type="info">
        if image\_align is `LV_IMAGE_ALIGN_STRETCH` or `LV_IMAGE_ALIGN_FIT` rotation will be set to 0 automatically.
      </Callout>
    </ApiMember>

    <ApiMember kind="function" name="lv_image_get_pivot" file="public/widgets/lv_image.h" line="262" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/lv_image.h#L262">
      lv_image_get_pivot [#lv_image_get_pivot]

      Get the pivot (rotation center) of the image. If pivot is set with LV\_PCT, convert it to px before return.

      ```c title=" " lineNumbers=1
      void lv_image_get_pivot(lv_obj_t *obj, lv_point_t *pivot)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name    | Type                                                 | Description                    |
      | ------- | ---------------------------------------------------- | ------------------------------ |
      | `obj`   | <ApiLink name="lv_obj_t" display="lv_obj_t *" />     | pointer to an image object     |
      | `pivot` | <ApiLink name="lv_point_t" display="lv_point_t *" /> | store the rotation center here |
    </ApiMember>

    <ApiMember kind="function" name="lv_image_get_scale" file="public/widgets/lv_image.h" line="269" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/lv_image.h#L269">
      lv_image_get_scale [#lv_image_get_scale]

      Get the zoom factor of the image.

      ```c title=" " lineNumbers=1
      int32_t lv_image_get_scale(lv_obj_t *obj)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                             | Description                |
      | ----- | ------------------------------------------------ | -------------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to an image object |

      **Returns:** `int32_t` — zoom factor (256: no zoom)
    </ApiMember>

    <ApiMember kind="function" name="lv_image_get_scale_x" file="public/widgets/lv_image.h" line="276" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/lv_image.h#L276">
      lv_image_get_scale_x [#lv_image_get_scale_x]

      Get the horizontal zoom factor of the image.

      ```c title=" " lineNumbers=1
      int32_t lv_image_get_scale_x(lv_obj_t *obj)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                             | Description                |
      | ----- | ------------------------------------------------ | -------------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to an image object |

      **Returns:** `int32_t` — zoom factor (256: no zoom)
    </ApiMember>

    <ApiMember kind="function" name="lv_image_get_scale_y" file="public/widgets/lv_image.h" line="283" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/lv_image.h#L283">
      lv_image_get_scale_y [#lv_image_get_scale_y]

      Get the vertical zoom factor of the image.

      ```c title=" " lineNumbers=1
      int32_t lv_image_get_scale_y(lv_obj_t *obj)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                             | Description                |
      | ----- | ------------------------------------------------ | -------------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to an image object |

      **Returns:** `int32_t` — zoom factor (256: no zoom)
    </ApiMember>

    <ApiMember kind="function" name="lv_image_get_src_width" file="public/widgets/lv_image.h" line="290" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/lv_image.h#L290">
      lv_image_get_src_width [#lv_image_get_src_width]

      Get the width of an image before any transformations.

      ```c title=" " lineNumbers=1
      int32_t lv_image_get_src_width(lv_obj_t *obj)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                             | Description                 |
      | ----- | ------------------------------------------------ | --------------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | Pointer to an image object. |

      **Returns:** `int32_t` — The width of the image.
    </ApiMember>

    <ApiMember kind="function" name="lv_image_get_src_height" file="public/widgets/lv_image.h" line="297" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/lv_image.h#L297">
      lv_image_get_src_height [#lv_image_get_src_height]

      Get the height of an image before any transformations.

      ```c title=" " lineNumbers=1
      int32_t lv_image_get_src_height(lv_obj_t *obj)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                             | Description                 |
      | ----- | ------------------------------------------------ | --------------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | Pointer to an image object. |

      **Returns:** `int32_t` — The height of the image.
    </ApiMember>

    <ApiMember kind="function" name="lv_image_get_transformed_width" file="public/widgets/lv_image.h" line="304" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/lv_image.h#L304">
      lv_image_get_transformed_width [#lv_image_get_transformed_width]

      Get the transformed width of an image object.

      ```c title=" " lineNumbers=1
      int32_t lv_image_get_transformed_width(lv_obj_t *obj)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                             | Description                 |
      | ----- | ------------------------------------------------ | --------------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | Pointer to an image object. |

      **Returns:** `int32_t` — The transformed width of the image.
    </ApiMember>

    <ApiMember kind="function" name="lv_image_get_transformed_height" file="public/widgets/lv_image.h" line="311" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/lv_image.h#L311">
      lv_image_get_transformed_height [#lv_image_get_transformed_height]

      Get the transformed height of an image object.

      ```c title=" " lineNumbers=1
      int32_t lv_image_get_transformed_height(lv_obj_t *obj)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                             | Description                 |
      | ----- | ------------------------------------------------ | --------------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | Pointer to an image object. |

      **Returns:** `int32_t` — The transformed height of the image.
    </ApiMember>

    <ApiMember kind="function" name="lv_image_get_blend_mode" file="public/widgets/lv_image.h" line="318" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/lv_image.h#L318">
      lv_image_get_blend_mode [#lv_image_get_blend_mode]

      Get the current blend mode of the image

      ```c title=" " lineNumbers=1
      lv_blend_mode_t lv_image_get_blend_mode(lv_obj_t *obj)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                             | Description                |
      | ----- | ------------------------------------------------ | -------------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to an image object |

      **Returns:** <ApiLink name="lv_blend_mode_t" /> — the current blend mode
    </ApiMember>

    <ApiMember kind="function" name="lv_image_get_antialias" file="public/widgets/lv_image.h" line="325" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/lv_image.h#L325">
      lv_image_get_antialias [#lv_image_get_antialias]

      Get whether the transformations (rotate, zoom) are anti-aliased or not

      ```c title=" " lineNumbers=1
      bool lv_image_get_antialias(lv_obj_t *obj)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                             | Description                |
      | ----- | ------------------------------------------------ | -------------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to an image object |

      **Returns:** `bool` — true: anti-aliased; false: not anti-aliased
    </ApiMember>

    <ApiMember kind="function" name="lv_image_get_inner_align" file="public/widgets/lv_image.h" line="332" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/lv_image.h#L332">
      lv_image_get_inner_align [#lv_image_get_inner_align]

      Get the size mode of the image

      ```c title=" " lineNumbers=1
      lv_image_align_t lv_image_get_inner_align(lv_obj_t *obj)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                             | Description                |
      | ----- | ------------------------------------------------ | -------------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to an image object |

      **Returns:** <ApiLink name="lv_image_align_t" /> — element of `lv_image_align_t`
    </ApiMember>

    <ApiMember kind="function" name="lv_image_get_bitmap_map_src" file="public/widgets/lv_image.h" line="339" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/lv_image.h#L339">
      lv_image_get_bitmap_map_src [#lv_image_get_bitmap_map_src]

      Get the bitmap mask source.

      ```c title=" " lineNumbers=1
      const lv_image_dsc_t * lv_image_get_bitmap_map_src(lv_obj_t *obj)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                             | Description                |
      | ----- | ------------------------------------------------ | -------------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to an image object |

      **Returns:** <ApiLink name="lv_image_dsc_t" display="const lv_image_dsc_t *" /> — an <ApiLink name="lv_image_dsc_t" /> bitmap mask source.
    </ApiMember>
  </ApiTab>

  <ApiTab value="Other (2)">
    <ApiMember kind="function" name="lv_image_create" file="public/widgets/lv_image.h" line="84" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/lv_image.h#L84">
      lv_image_create [#lv_image_create]

      Create an image object

      ```c title=" " lineNumbers=1
      lv_obj_t * lv_image_create(lv_obj_t *parent)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name     | Type                                             | Description                                                                                                         |
      | -------- | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------- |
      | `parent` | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to a parent widget **May** be `NULL`.. When NULL, the widget is created as a screen on the default display. |

      **Returns:** <ApiLink name="lv_obj_t" display="lv_obj_t *" /> — pointer to the created image
    </ApiMember>

    <ApiMember kind="function" name="lv_image_bind_src" file="public/widgets/lv_image.h" line="349" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/lv_image.h#L349">
      lv_image_bind_src [#lv_image_bind_src]

      Bind a pointer Subject to an Image's source.

      ```c title=" " lineNumbers=1
      lv_observer_t * lv_image_bind_src(lv_obj_t *obj, lv_subject_t *subject)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name      | Type                                                     | Description        |
      | --------- | -------------------------------------------------------- | ------------------ |
      | `obj`     | <ApiLink name="lv_obj_t" display="lv_obj_t *" />         | pointer to Image   |
      | `subject` | <ApiLink name="lv_subject_t" display="lv_subject_t *" /> | pointer to Subject |

      **Returns:** <ApiLink name="lv_observer_t" display="lv_observer_t *" /> — pointer to newly-created Observer
    </ApiMember>
  </ApiTab>
</ApiTabs>

Enums [#enums]

<ApiMember kind="enum" name="lv_image_align_t" file="public/widgets/lv_image.h" line="38" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/lv_image.h#L38">
  lv_image_align_t [#lv_image_align_t]

  Image size mode, when image size and object size is different

  | Name                               | Value | Description                                                                                                                     |
  | ---------------------------------- | ----- | ------------------------------------------------------------------------------------------------------------------------------- |
  | `LV_IMAGE_ALIGN_DEFAULT`           | `0`   |                                                                                                                                 |
  | `LV_IMAGE_ALIGN_TOP_LEFT`          |       |                                                                                                                                 |
  | `LV_IMAGE_ALIGN_TOP_MID`           |       |                                                                                                                                 |
  | `LV_IMAGE_ALIGN_TOP_RIGHT`         |       |                                                                                                                                 |
  | `LV_IMAGE_ALIGN_BOTTOM_LEFT`       |       |                                                                                                                                 |
  | `LV_IMAGE_ALIGN_BOTTOM_MID`        |       |                                                                                                                                 |
  | `LV_IMAGE_ALIGN_BOTTOM_RIGHT`      |       |                                                                                                                                 |
  | `LV_IMAGE_ALIGN_LEFT_MID`          |       |                                                                                                                                 |
  | `LV_IMAGE_ALIGN_RIGHT_MID`         |       |                                                                                                                                 |
  | `LV_IMAGE_ALIGN_CENTER`            |       |                                                                                                                                 |
  | `_LV_IMAGE_ALIGN_AUTO_TRANSFORM`   |       | Marks the start of modes that transform the image                                                                               |
  | `LV_IMAGE_ALIGN_STRETCH`           |       | Set X and Y scale to fill the Widget's area.                                                                                    |
  | `LV_IMAGE_ALIGN_TILE`              |       | Tile image to fill Widget's area. Offset is applied to shift the tiling.                                                        |
  | `LV_IMAGE_ALIGN_CONTAIN`           |       | The image keeps its aspect ratio, but is resized to the maximum size that fits within the Widget's area.                        |
  | `LV_IMAGE_ALIGN_CONTAIN_DOWNSCALE` |       | The image keeps its aspect ratio, but is resized to the maximum size that fits within the Widget's area if the image is bigger. |
  | `LV_IMAGE_ALIGN_COVER`             |       | The image keeps its aspect ratio and fills the Widget's area.                                                                   |
</ApiMember>

<TypeUsedBy name="lv_image_align_t" count="1">
  * `lv_image_set_inner_align` — param `align`
</TypeUsedBy>

<ApiMember kind="enum" name="_lv_property_image_id_t" file="public/widgets/lv_image.h" line="58" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/lv_image.h#L58">
  \_lv_property_image_id_t [#_lv_property_image_id_t]

  | Name                            | Value                                                           |
  | ------------------------------- | --------------------------------------------------------------- |
  | `LV_PROPERTY_IMAGE_SRC`         | `(LV_PROPERTY_IMAGE_START + ((int) 0 )) \| ((  6   ) <<  28 )`  |
  | `LV_PROPERTY_IMAGE_OFFSET_X`    | `(LV_PROPERTY_IMAGE_START + ((int) 1 )) \| ((  1   ) <<  28 )`  |
  | `LV_PROPERTY_IMAGE_OFFSET_Y`    | `(LV_PROPERTY_IMAGE_START + ((int) 2 )) \| ((  1   ) <<  28 )`  |
  | `LV_PROPERTY_IMAGE_ROTATION`    | `(LV_PROPERTY_IMAGE_START + ((int) 3 )) \| ((  1   ) <<  28 )`  |
  | `LV_PROPERTY_IMAGE_PIVOT`       | `(LV_PROPERTY_IMAGE_START + ((int) 4 )) \| ((  4   ) <<  28 )`  |
  | `LV_PROPERTY_IMAGE_SCALE`       | `(LV_PROPERTY_IMAGE_START + ((int) 5 )) \| ((  1   ) <<  28 )`  |
  | `LV_PROPERTY_IMAGE_SCALE_X`     | `(LV_PROPERTY_IMAGE_START + ((int) 6 )) \| ((  1   ) <<  28 )`  |
  | `LV_PROPERTY_IMAGE_SCALE_Y`     | `(LV_PROPERTY_IMAGE_START + ((int) 7 )) \| ((  1   ) <<  28 )`  |
  | `LV_PROPERTY_IMAGE_BLEND_MODE`  | `(LV_PROPERTY_IMAGE_START + ((int) 8 )) \| ((  1   ) <<  28 )`  |
  | `LV_PROPERTY_IMAGE_ANTIALIAS`   | `(LV_PROPERTY_IMAGE_START + ((int) 9 )) \| ((  1   ) <<  28 )`  |
  | `LV_PROPERTY_IMAGE_INNER_ALIGN` | `(LV_PROPERTY_IMAGE_START + ((int) 10 )) \| ((  1   ) <<  28 )` |
  | `LV_PROPERTY_IMAGE_END`         |                                                                 |
</ApiMember>

Macros [#macros]

<ApiMember kind="macro" name="LV_IMAGE_DECLARE" file="public/widgets/lv_image.h" line="357" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/lv_image.h#L357">
  LV_IMAGE_DECLARE [#lv_image_declare]

  ```c title=" " lineNumbers=1
  #define LV_IMAGE_DECLARE(var_name) \
      extern const lv_image_dsc_t var_name
  ```

  Use this macro to declare an image in a C file
</ApiMember>

Variables [#variables]

<ApiMember kind="variable" name="lv_image_class" file="public/widgets/lv_image.h" line="33" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/include/lvgl/widgets/lv_image.h#L33">
  lv_image_class [#lv_image_class]

  ```c title=" " lineNumbers=1
  const lv_obj_class_t lv_image_class
  ```
</ApiMember>

Dependencies [#dependencies]

<FileIncludes includes="[&#x22;lv_conf_internal.h&#x22;, &#x22;lv_obj.h&#x22;, &#x22;lv_fs.h&#x22;, &#x22;lv_draw.h&#x22;, &#x22;lv_observer.h&#x22;]" includedBy="[&#x22;lvgl.h&#x22;, &#x22;lv_animimage.h&#x22;, &#x22;lv_canvas.h&#x22;, &#x22;lv_scale.h&#x22;]" transitiveIncludes="[&#x22;lv_anim.h&#x22;, &#x22;lv_area.h&#x22;, &#x22;lv_assert.h&#x22;, &#x22;lv_bidi.h&#x22;, &#x22;lv_color.h&#x22;, &#x22;lv_color_op.h&#x22;, &#x22;lv_display.h&#x22;, &#x22;lv_draw_arc.h&#x22;, &#x22;lv_draw_blur.h&#x22;, &#x22;lv_draw_buf.h&#x22;, &#x22;lv_draw_image.h&#x22;, &#x22;lv_draw_label.h&#x22;, &#x22;lv_draw_line.h&#x22;, &#x22;lv_draw_rect.h&#x22;, &#x22;lv_draw_triangle.h&#x22;, &#x22;lv_event.h&#x22;, &#x22;lv_ext_data.h&#x22;, &#x22;lv_flex.h&#x22;, &#x22;lv_font.h&#x22;, &#x22;lv_grad.h&#x22;, &#x22;lv_grid.h&#x22;, &#x22;lv_group.h&#x22;, &#x22;lv_image_decoder.h&#x22;, &#x22;lv_image_dsc.h&#x22;, &#x22;lv_indev.h&#x22;, &#x22;lv_layout.h&#x22;, &#x22;lv_ll.h&#x22;, &#x22;lv_log.h&#x22;, &#x22;lv_math.h&#x22;, &#x22;lv_matrix.h&#x22;, &#x22;lv_mem.h&#x22;, &#x22;lv_obj_class.h&#x22;, &#x22;lv_obj_draw.h&#x22;, &#x22;lv_obj_event.h&#x22;, &#x22;lv_obj_pos.h&#x22;, &#x22;lv_obj_property.h&#x22;, &#x22;lv_obj_scroll.h&#x22;, &#x22;lv_obj_style.h&#x22;, &#x22;lv_obj_style_gen.h&#x22;, &#x22;lv_obj_tree.h&#x22;, &#x22;lv_palette.h&#x22;, &#x22;lv_profiler.h&#x22;, &#x22;lv_profiler_builtin.h&#x22;, &#x22;lv_sprintf.h&#x22;, &#x22;lv_string.h&#x22;, &#x22;lv_style.h&#x22;, &#x22;lv_style_gen.h&#x22;, &#x22;lv_symbol_def.h&#x22;, &#x22;lv_text.h&#x22;, &#x22;lv_timer.h&#x22;, &#x22;lv_types.h&#x22;]" />
