# lv_image.h (/api/widgets/image/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="widgets/image/lv_image.h" line="100" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/image/lv_image.h#L100">
      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) |
    </ApiMember>

    <ApiMember kind="function" name="lv_image_set_offset_x" file="widgets/image/lv_image.h" line="107" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/image/lv_image.h#L107">
      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`   | <ApiLink name="int32_t" />                       | the new offset along x axis. |
    </ApiMember>

    <ApiMember kind="function" name="lv_image_set_offset_y" file="widgets/image/lv_image.h" line="115" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/image/lv_image.h#L115">
      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`   | <ApiLink name="int32_t" />                       | the new offset along y axis. |
    </ApiMember>

    <ApiMember kind="function" name="lv_image_set_rotation" file="widgets/image/lv_image.h" line="127" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/image/lv_image.h#L127">
      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` | <ApiLink name="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="widgets/image/lv_image.h" line="137" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/image/lv_image.h#L137">
      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`   | <ApiLink name="int32_t" />                       | rotation center x of the image |
      | `y`   | <ApiLink name="int32_t" />                       | rotation center y of the image |
    </ApiMember>

    <ApiMember kind="function" name="lv_image_set_pivot_x" file="widgets/image/lv_image.h" line="144" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/image/lv_image.h#L144">
      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`   | <ApiLink name="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="widgets/image/lv_image.h" line="151" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/image/lv_image.h#L151">
      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`   | <ApiLink name="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="widgets/image/lv_image.h" line="164" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/image/lv_image.h#L164">
      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` | <ApiLink name="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="widgets/image/lv_image.h" line="177" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/image/lv_image.h#L177">
      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` | <ApiLink name="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="widgets/image/lv_image.h" line="190" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/image/lv_image.h#L190">
      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` | <ApiLink name="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="widgets/image/lv_image.h" line="197" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/image/lv_image.h#L197">
      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="widgets/image/lv_image.h" line="205" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/image/lv_image.h#L205">
      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` | <ApiLink name="bool" />                          | true: anti-aliased; false: not anti-aliased |
    </ApiMember>

    <ApiMember kind="function" name="lv_image_set_inner_align" file="widgets/image/lv_image.h" line="214" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/image/lv_image.h#L214">
      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="widgets/image/lv_image.h" line="221" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/image/lv_image.h#L221">
      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. |
    </ApiMember>
  </ApiTab>

  <ApiTab value="Getters (16)">
    <ApiMember kind="function" name="lv_image_get_src" file="widgets/image/lv_image.h" line="232" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/image/lv_image.h#L232">
      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 lv-img\_dsc\_t for C arrays)
    </ApiMember>

    <ApiMember kind="function" name="lv_image_get_offset_x" file="widgets/image/lv_image.h" line="239" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/image/lv_image.h#L239">
      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:** <ApiLink name="int32_t" /> — offset X value.
    </ApiMember>

    <ApiMember kind="function" name="lv_image_get_offset_y" file="widgets/image/lv_image.h" line="246" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/image/lv_image.h#L246">
      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:** <ApiLink name="int32_t" /> — offset Y value.
    </ApiMember>

    <ApiMember kind="function" name="lv_image_get_rotation" file="widgets/image/lv_image.h" line="255" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/image/lv_image.h#L255">
      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:** <ApiLink name="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="widgets/image/lv_image.h" line="263" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/image/lv_image.h#L263">
      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="widgets/image/lv_image.h" line="270" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/image/lv_image.h#L270">
      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:** <ApiLink name="int32_t" /> — zoom factor (256: no zoom)
    </ApiMember>

    <ApiMember kind="function" name="lv_image_get_scale_x" file="widgets/image/lv_image.h" line="277" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/image/lv_image.h#L277">
      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:** <ApiLink name="int32_t" /> — zoom factor (256: no zoom)
    </ApiMember>

    <ApiMember kind="function" name="lv_image_get_scale_y" file="widgets/image/lv_image.h" line="284" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/image/lv_image.h#L284">
      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:** <ApiLink name="int32_t" /> — zoom factor (256: no zoom)
    </ApiMember>

    <ApiMember kind="function" name="lv_image_get_src_width" file="widgets/image/lv_image.h" line="291" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/image/lv_image.h#L291">
      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:** <ApiLink name="int32_t" /> — The width of the image.
    </ApiMember>

    <ApiMember kind="function" name="lv_image_get_src_height" file="widgets/image/lv_image.h" line="298" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/image/lv_image.h#L298">
      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:** <ApiLink name="int32_t" /> — The height of the image.
    </ApiMember>

    <ApiMember kind="function" name="lv_image_get_transformed_width" file="widgets/image/lv_image.h" line="305" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/image/lv_image.h#L305">
      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:** <ApiLink name="int32_t" /> — The transformed width of the image.
    </ApiMember>

    <ApiMember kind="function" name="lv_image_get_transformed_height" file="widgets/image/lv_image.h" line="312" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/image/lv_image.h#L312">
      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:** <ApiLink name="int32_t" /> — The transformed height of the image.
    </ApiMember>

    <ApiMember kind="function" name="lv_image_get_blend_mode" file="widgets/image/lv_image.h" line="319" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/image/lv_image.h#L319">
      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="widgets/image/lv_image.h" line="326" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/image/lv_image.h#L326">
      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:** <ApiLink name="bool" /> — true: anti-aliased; false: not anti-aliased
    </ApiMember>

    <ApiMember kind="function" name="lv_image_get_inner_align" file="widgets/image/lv_image.h" line="333" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/image/lv_image.h#L333">
      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="widgets/image/lv_image.h" line="340" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/image/lv_image.h#L340">
      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="widgets/image/lv_image.h" line="87" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/image/lv_image.h#L87">
      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 an object, it will be the parent of the new image |

      **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="widgets/image/lv_image.h" line="350" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/image/lv_image.h#L350">
      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="widgets/image/lv_image.h" line="43" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/image/lv_image.h#L43">
  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_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="widgets/image/lv_image.h" line="62" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/image/lv_image.h#L62">
  \_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="widgets/image/lv_image.h" line="358" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/image/lv_image.h#L358">
  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="widgets/image/lv_image.h" line="38" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/image/lv_image.h#L38">
  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;lv_animimage.h&#x22;, &#x22;lv_canvas.h&#x22;, &#x22;lv_image_private.h&#x22;, &#x22;lv_scale.h&#x22;]" transitiveIncludes="[&#x22;lv_anim.h&#x22;, &#x22;lv_area.h&#x22;, &#x22;lv_array.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_conf_kconfig.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_property_names.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_style_properties.h&#x22;, &#x22;lv_symbol_def.h&#x22;, &#x22;lv_text.h&#x22;, &#x22;lv_tick.h&#x22;, &#x22;lv_timer.h&#x22;, &#x22;lv_types.h&#x22;]" />
