Skip to content

Commit

Permalink
Add 2 isns related scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
cevap committed Mar 30, 2018
1 parent c46bd54 commit cc4b053
Show file tree
Hide file tree
Showing 5 changed files with 131 additions and 0 deletions.
58 changes: 58 additions & 0 deletions contrib/devtools/ICNS2PNG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
Source: http://manpages.ubuntu.com/manpages/precise/man1/icns2png.1.html

NAME

icns2png - convert Mac OS icns files to png images

SYNOPSIS

icns2png [-x|-l] [options] [file ... ]

DESCRIPTION

icns2png extracts images from mac .icns files, and exports them to png
format.

OPTIONS

-l, --list
List the contents of one or more icns images

-x, --extract Extract one or more icons to png images

-o, --output
Where to place extracted files. If not specified, icons will be
extracted to the same path as the source file.

-d, --depth
Sets the pixel depth of the icons to extract. (1,4,8,32)

-s, --size
Sets the width and height of the icons to extract. (16,48,etc)
Sizes 16x12, 16x16, 32x32, 48x48, 128x128, etc. are also valid.

-h, --help
Displays this help message.

-v, --version Displays the version information

EXAMPLES

icns2png -x anicon.icns # Extract all icon found in
anicon.icns
icns2png -x -s 48 anicon.icns # Extract all 48x48 32-bit icons
icns2png -x -s 32 -d 1 anicon.icns # Extract all 32x32 1-bit icons
icns2png -l anicon.icns # Lists the icons contained in
anicon.icns

AUTHOR

Written by Mathew Eis

COPYRIGHT

Copyright © 2001-2008 Mathew Eis
This is free software; see the source for copying conditions. There is
NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.

32 changes: 32 additions & 0 deletions contrib/devtools/PNG2ICNS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
Source info: http://manpages.ubuntu.com/manpages/precise/man1/png2icns.1.html

NAME

png2icns - convert png images to Mac OS icns files

SYNOPSIS

png2icns file.icns file1.png [file2.png ... fileN.png ]

DESCRIPTION

png2icns imports one or more png images and converts them to an icns
file

EXAMPLES

png2icns icon.icns big.png small.png # Convert big.png and small.png
to icon.icns

AUTHOR

Written by Julien BLACHE

COPYRIGHT

Copyright © 2008 Julien BLACHE
Copyright © 2008 Mathew Eis
This is free software; see the source for copying conditions. There is
NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.

39 changes: 39 additions & 0 deletions contrib/devtools/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,42 @@ It will do the following automatically:
- add missing translations to the build system (TODO)

See doc/translation-process.md for more information.

png2icns
========

Run this script in a folder where your PNG's which you require for icns are.

_Importan Info_: _**Only** convert the **icons that match sizes icns supports**: (16x16, 32x32, 128x128, 256x256, 512x512 and 1024x1024 pixels)_


```
png2icns ion.icns ion_16x16x32.png ion_128x128x32.png ion_256x256x32.png ion_48x48x32.png ion_512x512x32.png
Using icns type 'is32', mask 's8mk' for 'ion_16x16x32.png'
Using icns type 'it32', mask 't8mk' for 'ion_128x128x32.png'
Using icns type 'ic08' (ARGB) for 'ion_256x256x32.png'
Using icns type 'ih32', mask 'h8mk' for 'ion_48x48x32.png'
Using icns type 'ic09' (ARGB) for 'ion_512x512x32.png'
Saved icns file to ion.icns
```

icns2png
========

Run this script in a folder where you temporarly placed your icns file. It will extract all files.


```
icns2png -x ion.icns
----------------------------------------------------
Reading icns family from ion.icns...
Extracting icons from ion.icns...
Saved 'is32' element to ion_16x16x32.png.
Saved 'il32' element to ion_32x32x32.png.
Saved 'ih32' element to ion_48x48x32.png.
Saved 'it32' element to ion_128x128x32.png.
Saved 'ic08' element to ion_256x256x32.png.
Saved 'ic09' element to ion_512x512x32.png.
Extracted 6 images from ion.icns.
```

1 change: 1 addition & 0 deletions contrib/devtools/icns2png.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
icns2png -x ion.icns
1 change: 1 addition & 0 deletions contrib/devtools/png2icns.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
png2icns ion.icns ion_16x16x32.png ion_128x128x32.png ion_256x256x32.png ion_48x48x32.png ion_512x512x32.png

0 comments on commit cc4b053

Please sign in to comment.