https://github.com/fcjr/geticon
A tiny cross-platform library to get app icons of other applications.
https://github.com/fcjr/geticon
cross-platform geticon golang icon img macos windows
Last synced: 6 months ago
JSON representation
A tiny cross-platform library to get app icons of other applications.
- Host: GitHub
- URL: https://github.com/fcjr/geticon
- Owner: fcjr
- License: mit
- Created: 2020-08-10T23:28:40.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2025-11-17T18:51:19.000Z (8 months ago)
- Last Synced: 2025-11-17T20:30:24.952Z (8 months ago)
- Topics: cross-platform, geticon, golang, icon, img, macos, windows
- Language: Go
- Homepage:
- Size: 78.1 KB
- Stars: 14
- Watchers: 1
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# geticon
[![GoDoc][doc-img]][doc] [![Go Report Card][report-card-img]][report-card]
A tiny cross-plaform (macOS + windows) library to get app icons of other applications.
## Installation
```sh
go get github.com/fcjr/geticon
```
## Usage
```go
import (
"github.com/fcjr/geticon"
)
// get icon of a running application by PID
icon, err := geticon.FromPid(pid) // returns an image.Image
// get icon of an application by path
icon, err := geticon.FromPath(path) // returns an image.Image
```
## Technical Details
On mac the image.Image returned should always be tiff encoded.
On windows the image.Image returned will be the largest available image from the apps
ico set. This can either be a PNG or a BMP.
[doc-img]: https://img.shields.io/static/v1?label=godoc&message=reference&color=blue
[doc]: https://pkg.go.dev/github.com/fcjr/geticon?GOOS=darwin#section-documentation
[report-card-img]: https://goreportcard.com/badge/github.com/fcjr/geticon
[report-card]: https://goreportcard.com/report/github.com/fcjr/geticon