A utility tools for copying data between image files and memory.
imgcopy
: Copies a specified image file to the clipboard.imgfile
: Writes an image in the clipboard to a specified file.
- macOS 14.2.1 or later
- Xcode 15.2 or later
- Swift 5.9.0 or later
These tools are not distributed, so you need to build them and copy them into a directory on your PATH to use them.
You can build them by running the following commands:
git clone https://github.com/mike-neck/imgcopy.git
cd imgcopy
make build
make pick
After running these commands, the following two binaries are created:
build/bin/imgfile
build/bin/imgcopy
You can then copy these into a directory on your PATH to use them.
This command copies an image file to the clipboard.
imgcopy /path/to/img.png
This command saves an image in the clipboard to a file.
imgfile /path/to/new-image.png