Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

copy merged document to clipboard without making selection first

Participant ,
Aug 23, 2025 Aug 23, 2025

Hello folks,
Is it possible to copy-merge to clipboard without selecting the whole document first? better yet, is it possible to do that for the whole document even if we have a selection (ignoring it)? 
currently I have a function that selects the whole document, copy-merges, then deselects again. but for advanced functionalities, I want to keep my current selection and copy-merge to clipboard, without having to first save my selection, select the whole document, then copy-merge before reloading my selection.

TOPICS
Actions and scripting
318
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Sep 23, 2025 Sep 23, 2025
quote

I fail to see the problem, the described steps could be included in the Script you are already using. 

Edit: … or store the Selction as QuickMask Mode temporarily. 


By @c.pfaffenbichler

 

QM mode would appear to be workable, as long as the RGB channel is selected afterwards, and not the default Quick Mask channel.

 

EDIT: For clarity...

 

With a layered file and a selection active -

 

1) Enter QM mode

2) Select the composite RGB channel

3) Select all

4) Copy merged

5) Exit QM mode (to return t

...
Translate
Adobe
Community Expert ,
Aug 23, 2025 Aug 23, 2025

Not sure what you mean, Merge Visible retains the selection.

 

You could also try shift+ctrl+alt+E, stamp visible. It merges visible layers to a new layer on top of the stack.

 

Maybe I'm missing something?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Aug 23, 2025 Aug 23, 2025

I'm not looking to "merge visible" (creating a new layer from merged layers) but to "copy-merge"  (copy merged layers as a bitmap into the clipboard). I believe these are the terms officially used by photoshop. I'm also looking for a programmatic solution, hence the "Actions and scripting" flag I added.
The code I'm currently using relies on activeDocument.selection.copy(). So, if I have a selection, it would copy-merge only around the selection, and to copy-merge the entire document, I need to first save my current selection as a channel, then select all, copy-merge, and then restore my older selection and delete its channel. This seems to me like a huge overhead for the wanted task.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 23, 2025 Aug 23, 2025

Right. I was missing something 😉

 

No, I'm not aware ony way to Copy Merged without Select All first.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 24, 2025 Aug 24, 2025

What is the actual point here, what do you need the complete merged image in the clipboard for? 

A work-around with an Action seems feasible (duplicate merged image, select all, copy, close without saving). 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Aug 24, 2025 Aug 24, 2025

I'm using DOM scripting to take the image from the clipboard and process it using an external library. I'm already achieving the wanted result, without the need to duplicate-merge as we can already copy-merge if we select all, but I was looking for a more straightforward approach that automatically preserves my current selection without having to save it to a channel or do another workaround. Apparently that's not possible.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 24, 2025 Aug 24, 2025

I fail to see the problem, the described steps could be included in the Script you are already using. 

Edit: … or store the Selction as QuickMask Mode temporarily. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 23, 2025 Sep 23, 2025
quote

I fail to see the problem, the described steps could be included in the Script you are already using. 

Edit: … or store the Selction as QuickMask Mode temporarily. 


By @c.pfaffenbichler

 

QM mode would appear to be workable, as long as the RGB channel is selected afterwards, and not the default Quick Mask channel.

 

EDIT: For clarity...

 

With a layered file and a selection active -

 

1) Enter QM mode

2) Select the composite RGB channel

3) Select all

4) Copy merged

5) Exit QM mode (to return the original selection)

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Sep 23, 2025 Sep 23, 2025
LATEST

Since Photoshop is capable to create an image from the whole document without selection when duplicate-merging (ctrl+alt+shift+E or equivalent in code), I thought maybe there's a way to get that image but without placing it into a new layer, but into the clipboard instead.
and since it can look at a selection area and copy-merge it, I thought maybe there's a way to copy-merge the entirety of the document, regardless of selection.
Like an in-between low-level solution to skip certain extra steps and achieve what I want.
But now I understand that photoshop scripting offers a certain set of actions that we can use to get what we want, even if it's not the most logically-direct way to do things (e.g: like Marsh's script that creates a new layer from selection then fits to layer and deletes the created layer in order to zoom to selection ¯\_(ツ)_/¯).

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 23, 2025 Sep 23, 2025

Have you been able to achieve a workable solution? 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines