# Ps plugin abilities

**URL:** <https://forums.creativeclouddeveloper.com/t/ps-plugin-abilities/2643>\
**Category:** Photoshop\
**Tags:** api-feedback\
**Created:** [March 12, 2021, 2:06pm UTC](https://forums.creativeclouddeveloper.com/t/ps-plugin-abilities/2643 "2021-03-12T14:06:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Enno\_Zhong](https://avatars.discourse-cdn.com/v4/letter/e/53a042/32.png) [@Enno\_Zhong](https://forums.creativeclouddeveloper.com/u/Enno_Zhong)\
**Post date:** [March 12, 2021, 2:06pm UTC](https://forums.creativeclouddeveloper.com/t/ps-plugin-abilities/2643/1 "2021-03-12T14:06:14Z")

</div>

hello experts  
One question from customer, Currently they are working on a PS plug-in and the functions are similar with XD plugin.

1. Upload a screenshot of the art board,
2. Upload the layer information (label)
3. Convert the user’s layer into a picture, and then upload (sliced images)

They want to know how they can achieve these abilities, thank you for your help

---

<div class="post-metadata">

**Author:** ![kerrishotts](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/kerrishotts/32/8_2.png) [@kerrishotts](https://forums.creativeclouddeveloper.com/u/kerrishotts)\
**Post date:** [March 12, 2021, 5:37pm UTC](https://forums.creativeclouddeveloper.com/t/ps-plugin-abilities/2643/2 "2021-03-12T17:37:48Z")

</div>

1. Upload a screenshot of the artboard

2. Upload the layer information

3. Convert the user’s layer into a picture, and then upload (sliced images)

---

<div class="post-metadata">

**Author:** ![liuxiao](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/liuxiao/32/1905_2.png) [@liuxiao](https://forums.creativeclouddeveloper.com/u/liuxiao)\
**Post date:** [December 27, 2021, 4:04am UTC](https://forums.creativeclouddeveloper.com/t/ps-plugin-abilities/2643/3 "2021-12-27T04:04:08Z")

</div>

Hello @kerrishotts

> Better APIs are planned for this year, but for now, the process is a bit awkward.

How is this going?

Our goal is to get the slice PNG/SVG/JPG buffer of the layer (if needed, @1x,@2x,etc. ), and upload to our service. like Zeplin Plugin.

Currently I can only do this:

1. create temp Document
2. copy layer to this Document (and hide some auxiliary child layers.)
3. scale layer if needed. Extra, scale strokes, radius and effects by batchPlay
4. create temp local file
5. save document to temp file
6. read buffer from local file
7. close temp document (can not reuse it, because document can not clear all layers easily)
8. repeat 1 to handle next layer

This leads to unsatisfactory performance.  
We are eager for a simpler and better-performing way to finish this job.Just like `const buffer = layer.getLayerBuffer({type:'png', scale: 2, ...otherOptions})`  
Or is there a better way I haven’t found?

---

<div class="post-metadata">

**Author:** ![liuxiao](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/liuxiao/32/1905_2.png) [@liuxiao](https://forums.creativeclouddeveloper.com/u/liuxiao)\
**Post date:** [December 27, 2021, 7:37am UTC](https://forums.creativeclouddeveloper.com/t/ps-plugin-abilities/2643/4 "2021-12-27T07:37:51Z")

</div>

I did some tests, and I think the slower problem mainly appeared on some dom APIs.

For a layer with 26 sub-layers:

- took 1.78s to copy to the temp document, use `Layer#duplicate`
- took 2.33s to adjust the layer position(It’s not always center of the document after scale the layer), use Layer#nudge
- took 800ms to scale effect,stroke width and radius. not dom API, use `batchPlay` for each one

At least on my computer, and it makes me very frustrated.
