# Capturing Cropped Image Based on Eye Gaze and Slider (Magic Leap SDK C API)

**URL:** <https://forum.magicleap.cloud/t/capturing-cropped-image-based-on-eye-gaze-and-slider-magic-leap-sdk-c-api/6194>\
**Category:** Native Development\
**Created:** [August 12, 2025, 11:41am UTC](https://forum.magicleap.cloud/t/capturing-cropped-image-based-on-eye-gaze-and-slider-magic-leap-sdk-c-api/6194 "2025-08-12T11:41:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dawar.khan977](https://avatars.discourse-cdn.com/v4/letter/d/90ced4/32.png) [@dawar.khan977](https://forum.magicleap.cloud/u/dawar.khan977)\
**Post date:** [August 12, 2025, 11:41am UTC](https://forum.magicleap.cloud/t/capturing-cropped-image-based-on-eye-gaze-and-slider-magic-leap-sdk-c-api/6194/1 "2025-08-12T11:41:03Z")

</div>

Give us as much detail as possible regarding the issue you’re experiencing.

**ML2 OS version** :  
**MLSDK version** : v1.12.0  
**Host OS** : (Windows/MacOS)

Hi Magic Leap Developers,

I’m working on a project using the **Magic Leap SDK C API** where I need to create a **dynamic red rectangle** that follows the user’s **eye gaze** , with the ability to adjust its size via a **slider**. When the user clicks “Save”, the system should **capture and save the content inside the rectangle** (cropped).

I’m looking for help with:

1. Tracking the user’s eye gaze.

2. Creating the adjustable rectangle.

3. Capturing and saving the cropped image inside the rectangle.

Any **resources** or **code samples** would be greatly appreciated. Thanks in advance!

---

<div class="post-metadata">

**Author:** ![magicbot](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/magicbot/32/2470_2.png) [@magicbot](https://forum.magicleap.cloud/u/magicbot)\
**Post date:** [August 20, 2025, 6:57pm UTC](https://forum.magicleap.cloud/t/capturing-cropped-image-based-on-eye-gaze-and-slider-magic-leap-sdk-c-api/6194/2 "2025-08-20T18:57:49Z")

</div>

Please see our Unity Developer Portal for information about the APIs and the Magic Leap SDK as well as the new Magic Leap OpenXR SDK.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex019/uploads/magicleap1/original/1X/bd9b737a4d45ea243aa7eb177d60a773b806899a.svg) [@system](https://forum.magicleap.cloud/u/system)\
**Post date:** [August 30, 2025, 11:41pm UTC](https://forum.magicleap.cloud/t/capturing-cropped-image-based-on-eye-gaze-and-slider-magic-leap-sdk-c-api/6194/3 "2025-08-30T23:41:08Z")

</div>

Closed on August 30, 2025, 11:41pm UTC

This topic was automatically closed after 18 days. New replies are no longer allowed.
