# I found an error in the imaging documentation page

**URL:** <https://forums.creativeclouddeveloper.com/t/i-found-an-error-in-the-imaging-documentation-page/7686>\
**Category:** UXP Plugin API\
**Tags:** bug, uxp, javascript, api-feedback\
**Created:** [March 20, 2024, 12:38am UTC](https://forums.creativeclouddeveloper.com/t/i-found-an-error-in-the-imaging-documentation-page/7686 "2024-03-20T00:38:41Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![photonic](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/photonic/32/2513_2.png) [@photonic](https://forums.creativeclouddeveloper.com/u/photonic)\
**Post date:** [March 20, 2024, 12:38am UTC](https://forums.creativeclouddeveloper.com/t/i-found-an-error-in-the-imaging-documentation-page/7686/1 "2024-03-20T00:38:41Z")

</div>

Playing around with Imaging API, I found this dispose() method which frees memory after using the .getData() method. However here’s the issue I found:

Here’s the link to the documentation error:

> **[Imaging API](https://developer.adobe.com/photoshop/uxp/2022/ps_reference/media/imaging/#dispose)**

If you try to run the same code in the example:

```auto
const pixelData = await imageObj.imageData.getData();
pixelData.dispose();
// This will return an error: "pixelData.dispose is not a function"

```

Which is obvious as the `getData()` method returns an array of numbers (image pixel data) and not an object, so the object is the `imageObj.ImageData` and this can call the `dispose()` function indeed to free the memory from the imageObj.imageData.getData();

 ![image](https://us1.discourse-cdn.com/flex015/uploads/xdplugins/original/2X/3/331cabda5a3369d9d5aa9edd0ef2b31ff2348289.png)

How I know this?

I tried to do the `imageObj.imageData.dispose()` method after storing the data obtained with the `imageObj.imageData.getData()` it into a constant and it worked.

So I think this should be changed to  
`imageObj.imageData.dispose();`  
Instead of  
`pixelData.dispose();`

So this is something that can be confusing for future developers reading the documentation.

Hope it gets clear enough.

Correct if I’m wrong, please.

---

<div class="post-metadata">

**Author:** ![Karmalakas](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/karmalakas/32/1048_2.png) [@Karmalakas](https://forums.creativeclouddeveloper.com/u/Karmalakas)\
**Post date:** [March 20, 2024, 6:06am UTC](https://forums.creativeclouddeveloper.com/t/i-found-an-error-in-the-imaging-documentation-page/7686/2 "2024-03-20T06:06:29Z")

</div>

Try reporting [issue on GitHub](https://github.com/AdobeDocs/uxp-photoshop/issues). And I believe [this is the page](https://github.com/AdobeDocs/uxp-photoshop/blob/main/src/pages/ps_reference/media/imaging.md) you’re refering to.

BTW, years ago I tried to contribute there, but their some agreement signing process is was a blocker, so I didn’t bother any more. Maybe they changed that policy. It’s insane to request to sign some agreement for public repo

---

<div class="post-metadata">

**Author:** ![Erin\_Finnegan](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/erin_finnegan/32/100_2.png) [@Erin\_Finnegan](https://forums.creativeclouddeveloper.com/u/Erin_Finnegan)\
**Post date:** [March 26, 2024, 8:04pm UTC](https://forums.creativeclouddeveloper.com/t/i-found-an-error-in-the-imaging-documentation-page/7686/3 "2024-03-26T20:04:27Z")

</div>

> [@Karmalakas](#):
>
> BTW, years ago I tried to contribute there, but their some agreement signing process is was a blocker, so I didn’t bother any more. Maybe they changed that policy. It’s insane to request to sign some agreement for public repo

Ah, you mean this bit:

 ![Screenshot 2024-03-26 at 3.59.57 PM](https://us1.discourse-cdn.com/flex015/uploads/xdplugins/original/2X/d/d82abd36c970fee7cbd8eab9d3f7a32365c9071b.png)

[Which links here to the Open Source CLA](https://opensource.adobe.com/cla.html) … the legal team required that checkbox. I think PRs don’t go through if you don’t check it.

---

<div class="post-metadata">

**Author:** ![Karmalakas](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/karmalakas/32/1048_2.png) [@Karmalakas](https://forums.creativeclouddeveloper.com/u/Karmalakas)\
**Post date:** [March 27, 2024, 5:30am UTC](https://forums.creativeclouddeveloper.com/t/i-found-an-error-in-the-imaging-documentation-page/7686/4 "2024-03-27T05:30:58Z")

</div>

Yes, this must be it (on mobile it won’t allow me to view the page). Sorry, but I’m not signing anything (especially what I don’t understand) to be able to simply suggest the changes, which might be not even accepted 🤷‍♂️

---

<div class="post-metadata">

**Author:** ![photonic](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/photonic/32/2513_2.png) [@photonic](https://forums.creativeclouddeveloper.com/u/photonic)\
**Post date:** [March 27, 2024, 7:18pm UTC](https://forums.creativeclouddeveloper.com/t/i-found-an-error-in-the-imaging-documentation-page/7686/5 "2024-03-27T19:18:10Z")

</div>

Thank you, just posted it on github!

---

<div class="post-metadata">

**Author:** ![samgannaway](https://avatars.discourse-cdn.com/v4/letter/s/898d66/32.png) [@samgannaway](https://forums.creativeclouddeveloper.com/u/samgannaway)\
**Post date:** [April 18, 2024, 3:09pm UTC](https://forums.creativeclouddeveloper.com/t/i-found-an-error-in-the-imaging-documentation-page/7686/6 "2024-04-18T15:09:19Z")

</div>

Ah, yes, `dispose` is a sibling method to `getData`. I’ll update the source of the documentation.
