{"id":20532510,"url":"https://github.com/joshdk/preview","last_synced_at":"2026-04-20T14:36:34.914Z","repository":{"id":57504359,"uuid":"107341585","full_name":"joshdk/preview","owner":"joshdk","description":"🖼 Simple cross platform image viewing for developers","archived":false,"fork":false,"pushed_at":"2017-11-01T18:41:00.000Z","size":4649,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-16T13:17:33.376Z","etag":null,"topics":["cross-platform","golang","image-viewer"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joshdk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-10-18T01:06:09.000Z","updated_at":"2017-11-09T22:03:48.000Z","dependencies_parsed_at":"2022-08-30T01:31:44.458Z","dependency_job_id":null,"html_url":"https://github.com/joshdk/preview","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshdk%2Fpreview","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshdk%2Fpreview/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshdk%2Fpreview/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshdk%2Fpreview/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joshdk","download_url":"https://codeload.github.com/joshdk/preview/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242138805,"owners_count":20078007,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["cross-platform","golang","image-viewer"],"created_at":"2024-11-16T00:15:17.946Z","updated_at":"2026-04-20T14:36:29.876Z","avatar_url":"https://github.com/joshdk.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![License](https://img.shields.io/github/license/joshdk/preview.svg)](https://opensource.org/licenses/MIT)\n[![GoDoc](https://godoc.org/github.com/joshdk/preview?status.svg)](https://godoc.org/github.com/joshdk/preview)\n[![Go Report Card](https://goreportcard.com/badge/github.com/joshdk/preview)](https://goreportcard.com/report/github.com/joshdk/preview)\n[![CircleCI](https://circleci.com/gh/joshdk/preview.svg?\u0026style=shield)](https://circleci.com/gh/joshdk/preview/tree/master)\n\n# Preview\n\n🎨 Simple cross platform image viewing for developers\n\n## Installing\n\nYou can fetch this library by running the following\n\n    go get -u github.com/joshdk/preview\n\n## Usage\n\n```go\nimport (\n\t\"image/jpeg\"\n\t\"net/http\"\n\t\"github.com/joshdk/preview\"\n)\n\nresp, err := http.Get(\"https://i.imgur.com/X9GB4Pu.jpg\")\nif err != nil {\n\tpanic(err.Error())\n}\n\nimg, err := jpeg.Decode(resp.Body)\nif err != nil {\n\tpanic(err.Error())\n}\n\npreview.Image(img)\n```\n\nIf run on a Mac, this code will open up the [Preview utility](https://en.wikipedia.org/wiki/Preview_(macOS)), displaying the downloaded image. On Linux, the [display](https://linux.die.net/man/1/display) or [xv](https://en.wikipedia.org/wiki/Xv_(software)) utility is used.\n\nPreviewing of the following types are supported:\n\n- [`color.Color`](https://golang.org/pkg/image/color/#Color) (or a slice of `[]color.Color`)\n- [`image.Image`](https://golang.org/pkg/image/#Image)\n- [`glot.Plot`](https://godoc.org/github.com/Arafatk/glot#Plot) from [Glot](https://github.com/Arafatk/glot)\n- [`plot.Plot`](https://godoc.org/gonum.org/v1/plot#Plot) from [Gonum Plot](https://github.com/gonum/plot)\n- Local filesystem paths\n\n## License\n\nThis library is distributed under the [MIT License](https://opensource.org/licenses/MIT), see LICENSE.txt for more information.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoshdk%2Fpreview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoshdk%2Fpreview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoshdk%2Fpreview/lists"}