mushanshitiancai / vscode-paste-image

paste image from clipboard to markdown/asciidoc directly!
MIT License
422 stars 127 forks source link

there is not a image in clipboard mac catalina #65

Open xiaoouwang opened 4 years ago

xiaoouwang commented 4 years ago

I can no longer use this extension, maybe after an upgrading to mac catalina.

I also installed xclip, but to no avail.

VSC 1.42.1 macOS 10.15.3

Any possible problems ?

Tks in advance !

xiaoouwang commented 4 years ago

Well not being an expert of apple script I tweaked the linux.sh file to be used under Mac and found a workaround :

if
pngpaste $1 > /dev/null 2>&1
then
pngpaste $1
echo $1
else
echo "no image"
fi

Maybe one day I'll come back to find why the apple script bugs

petermarnef commented 4 years ago

Hi, I have the same issue, also on Catalina (10.15.4)

sakamoto66 commented 3 years ago

hi, @xiaoouwang, @petermarnef It corresponded. But I don't have a mac. Can you have it tried?

https://marketplace.visualstudio.com/items?itemName=sakamoto66.vscode-paste-image

petermarnef commented 3 years ago

Hi! Sorry for the late reply.

I tested on MAC again but it does not seem to work (or maybe I forgot how to use this extension correctly ;-)). Repro steps:

  1. Install the extension
  2. Take screenshot so something is on the clipboard
  3. Go to a markdown file
  4. Paste the image (I tried normal past, and also the different Paste as image options found in the VSCode commands list.
  5. Error = You need to install pngpaste command first.

This is an FYI, have not done further investigation concerning this error (pngpaste does not seem to be an extension you can install).

sakamoto66 commented 3 years ago

Hi, @petermarnef . pngpaste is command. Can be installed with 'brew'.

$ brew install pngpaste

https://formulae.brew.sh/formula/pngpaste

cj3kim commented 3 years ago

If it wasn't clear, the solution is posted here in Chinese: https://github.com/mushanshitiancai/vscode-paste-image/issues/67. The instructions are pretty easy to figure out once you put them through google translate.

whilerediculous commented 2 years ago

I have the same issue, but it do not work with brew install pngpaste