Skip to content

sallar/GetAppIcon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GetAppIcon

Get app icons by PID on macOS. Returns a base64 encoded data string which can be used for displaying or manipulating the resulting image.

Usage

$ swift build -c release
$ .build/release/GetAppIcon --help
Usage:

    $ .build/release/GetAppIcon <pid>

Arguments:

    pid - PID of the app

Options:
    --size [default: 32] - Size of the output icon
    --encoding [default: base64] - Encoding of output icon

Example

$ .build/release/GetAppIcon 814 --size 512
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAA...

$ .build/release/GetAppIcon 292 --size 512 --encoding buffer > icon.png