So I got fed up with this annoyance and made a workaround.
There are two pieces to it:
- A tiny utility I wrote to save the clipboard image to a .png file
- An AutoHotKey script
The AutoHotKey script checks if Photoshop is currently active, and if so it intercepts the Ctrl
+V
key combination, and then it runs the utility.
If the utility saved an image to %TEMP%\clip.png
, the Shift
+Ctrl
+F12
key combination is sent to Photoshop, which I have mapped to a Photoshop Action to place the clip.png
file into the currently open document.
If the utility did not save the image, the standard Ctrl
+V
key combo is sent to Photoshop and a standard paste is performed.
All the source code is available here: https://github.com/SilverEzhik/ClipboardToPNG, and the utility can be downloaded here: https://github.com/SilverEzhik/ClipboardToPNG/releases
To create the Photoshop Action, just make a new action with the key combination mapped to Shift+Ctrl+F12 (or change the combination in the script file), and then while recording, go to File
> Place Embedded...
, and paste %TEMP%\clip.png
in the file name field.
The source code for the AHK script is provided below - if you haven't used AutoHotKey before, install it, then save the code to a filename.ahk
file to the same directory as the ClipboardToPNG.exe utility, and then just run it.
DoPhotoshopPaste() {
RunWait, %A_ScriptDir%\ClipboardToPNG.exe ; run utility, wait for it to complete
if (ErrorLevel == 0) { ; if error code is 0
SendEvent, +^{F12} ; press Shift+Ctrl+F12 to run the designated Photoshop action to paste
}
else {
SendEvent, ^v ; else, just perform a standard paste.
}
}
#IfWinActive ahk_exe Photoshop.exe ; only activate this hotkey when photoshop is active
^v::DoPhotoshopPaste()
#IfWinActive
.png
file or its bitmap while it is opened in an editor/viewer? If it is the file, then Photoshop (should) be able to open the file correctly, transparency and all. If it is the picture’s actual pixels, then it depends on the source program and whether it is putting the transparency data in the clipboard or not.