jcsalterego / pngpaste

Paste PNG into files, much like pbpaste does for text.
Other
458 stars 32 forks source link

I have got an empty image with pngpaste in OSX 10.12 #11

Closed griffinqiu closed 7 years ago

griffinqiu commented 7 years ago

I installed pngpaste via brew. However, the pngpaste does not work as well. An empty image been generate like:

image

griffinqiu commented 7 years ago

It works if I copied more than one png files. However, I will get an empty file if I only copy one png file

jcsalterego commented 7 years ago

@griffinqiu Oh no, that doesn't sound great. However, I haven't been able to reproduce this. How are you copying the PNG file in the first place?

griffinqiu commented 7 years ago

I copied that png file with command-c

jcsalterego commented 7 years ago

In Preview, or in Finder?

griffinqiu commented 7 years ago

in Finder. However, it could be paste one file if I copy two files in Finder

jcsalterego commented 7 years ago

OK, I have been able to reproduce this locally with another destination application:

  1. Copy one PNG in Finder (highlight and Edit > Copy "file.png")
  2. Paste in Photoshop

Result: 1024x1024 PNG that represents the file type.

I don't think Finder actually makes the image data available, but provides a reference to the original file. Looking at the output of pbpaste, it is the filename, not the contents of the file.

Ultimately I don't think Finder Copy is a supported source for pngpaste, and it only supports copying an image directly, rather than copying a reference to a file.

griffinqiu commented 7 years ago

Thanks, I got it