0

I know on Windows, powershell Get-Clipboard -format image outputs the clipboard image.

But the Set-Clipboard command doesn't seem to support image.

Also, how to transform the output from Get-Clipboard -format image to buffer or base64 string?

1

2 Answers 2

2

This worked for me.

Get-ChildItem <Image Path> | Set-Clipboard
Sign up to request clarification or add additional context in comments.

Comments

0

this worked and more native

one line code:

Add-Type -Assembly System.Drawing, System.Windows.Forms; [System.Windows.Forms.Clipboard]::SetImage([System.Drawing.Image]::FromFile("string filename"))

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.