{"id":41509636,"url":"https://github.com/paulsmith/pbimg","last_synced_at":"2026-01-23T19:41:52.955Z","repository":{"id":231636958,"uuid":"782285433","full_name":"paulsmith/pbimg","owner":"paulsmith","description":"pbpaste for image data on macOS","archived":false,"fork":false,"pushed_at":"2024-04-05T17:41:47.000Z","size":24,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-04-16T01:26:16.389Z","etag":null,"topics":["clipboard","images","macos","pasteboard"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit-0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/paulsmith.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-04-05T01:53:52.000Z","updated_at":"2024-04-16T01:26:16.390Z","dependencies_parsed_at":"2024-04-05T03:23:58.610Z","dependency_job_id":"f441afb5-cb46-4221-bbda-08d3df5f1de8","html_url":"https://github.com/paulsmith/pbimg","commit_stats":null,"previous_names":["paulsmith/impaste"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/paulsmith/pbimg","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulsmith%2Fpbimg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulsmith%2Fpbimg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulsmith%2Fpbimg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulsmith%2Fpbimg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paulsmith","download_url":"https://codeload.github.com/paulsmith/pbimg/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulsmith%2Fpbimg/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28699225,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T17:25:48.045Z","status":"ssl_error","status_checked_at":"2026-01-23T17:25:47.153Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clipboard","images","macos","pasteboard"],"created_at":"2026-01-23T19:41:52.544Z","updated_at":"2026-01-23T19:41:52.945Z","avatar_url":"https://github.com/paulsmith.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pbimg - Clipboard image saver\n\n[![CI](https://github.com/paulsmith/pbimg/actions/workflows/ci.yml/badge.svg)](https://github.com/paulsmith/pbimg/actions/workflows/ci.yml)\n\nA command-line application for macOS that saves the clipboard image to a file or\noutputs the raw bytes to stdout. It works similarly to `pbpaste`, but that utility\nis limited to textual data.\n\n## How it works\n\nIt saves the clipboard image to a specified file path, or to stdout if it is\nredirected.\n\n## Requirements\n\n- macOS\n- Xcode Command Line Tools\n\n## Installation\n\n1. Clone the repository or download the source code.\n2. Compile the Swift code using the following command:\n\n```sh\nswift build\n```\n\nThen copy the build artifact `./.build/arm64-apple-macosx/debug/pbimg` to your\n$PATH.\n\nExample:\n\n```sh\ninstall -m 0755 ./.build/arm64-apple-macosx/debug/pbimg $HOME/.local/bin\n```\n\n## Usage\n\nTo save the clipboard image to a file:\n\n```sh\npbimg \u003cfile_path\u003e\n```\n\nTo output the raw bytes of the clipboard image to stdout:\n\n```sh\npbimg \u003e \u003cfile_path\u003e\n```\n\nTo force output the raw bytes to stdout even if stdout is a terminal. Note that\nthis might cause your terminal to enter an odd state.\n\n```sh\npbimg [-f | --force]\n```\n\n## Example\n\nFor example, use the screenshot utility to copy a screenshot to the clipboard:\n`⌘`+`⌃`+`⇧`+`4`\n\n```sh\npbimg output.png\n```\n\nhttps://github.com/paulsmith/pbimg/assets/1210/8b3a32b4-33d8-4e5a-a9ec-cb67a5ed1681\n\n### Convert format\n\nWith ImageMagick (or GraphicsMagick) installed, convert between formats with a\npipeline:\n\n```sh\npbimg | convert - output.gif\n```\n\n```sh\npbimg | convert - -quality 65 output.jpg\n```\n\n### Resize\n\n```sh\npbimg | convert - -resize 25% thumbnail.png\n```\n\n### Get info about image on pasteboard\n\n```sh\npbimg | identify -\n-=\u003e/var/folders/mc/p59f_1dd1w9b9tfc1zc6f1gr0000gn/T/magick-7LMqLeLrxmEOVvX3zBqn_VF8y2ouyaVO PNG 3248x2080 3248x2080+0+0 8-bit sRGB 970964B 0.010u 0:00.000\n```\n\n### Upload to web service\n\n```sh\npbimg | curl --data-binary @- https://example.com/upload\n```\n\n## Acknowledgements\n\n[Simon Willison](https://til.simonwillison.net/macos/impaste) for the idea.\n\n## License\n\nThis project is licensed under the [MIT No Attribution License](COPYING).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaulsmith%2Fpbimg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaulsmith%2Fpbimg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaulsmith%2Fpbimg/lists"}