Source i (link to git-repo or to original if based on someone elses unmodified work):

Add the source-code for this project on opencode.net

1
Become a Fan
5.0

Description:
Last changelog:

1.4+)
Now has support for 256x256 and 512x512 icns images, and command-line support for choosing various sizes and depths.

Now has batch extraction support


Ratings & Comments

22 Comments

IlMaz

Finally I can use this program on my Mandrake8.1... I love Mac icons. Great piece of software! Thank you for the source!

noonespecial

Perfect! Everything in SNOW.E converted fine :) This package really fills a need!

noonespecial

It's worked great for me for every .icns icon so far except the ones in the SNOW.E aqua theme. Running "file" on them shows this: Macintosh MacBinary data, type "Icon", creator "Mngl" But trying to convert, I get this error: Converting Finder to Finder.png... Error loading icns resource! Unable to find requested icon data! Icon image is NULL! Conversion of Finder failed! Any idea what's wrong?

mathew

It is not parsing the resource maps on that icon set properly... I am looking into it.

mathew

...forks. I found the problem - it is with a 3 byte int (!!??) in the mac os resource maps. I think this should fix the rest of the problems people are having, so I will release 0.5 non beta as soon as I figure out how to read the 3 byte int on x86. On a side note, if people are willing to give a little in donations, I am now willing to open source GPL. Think of the possibilities... :D

noonespecial

I didn't expect a reply to that, honestly :) Good to know the problem is at least tracked down; do you have an idea of when 0.5 might be ready? If icns2png can reliably convert all OSX icons, I think it would be worth the donation you ask for to get a KFile_ICNS plugin into KDE.

mathew

I wasn't really expecting a reply either... But then... I did get one :D Thought the techies might like to know that stuff, but then, this isn't exactly a devel forum. I am already planning a kfile plugin, and also want kview to support the format. I need a bit of input from some kde development savvy people. E-mail me: mathew%bearca!.com (Obvious changes to address) Expect 0.5 within the week... -Mathew

bdufour

Thanks for the great program, but while using it I often get files that do not have the .png extension (e.g .pnQ is a rather common one). Also, I get a lot of segmentation faults, preventing the conversion of many icons. I am thinking that these 2 problems might be related. They remind me of the (common) mistakes that people make when manipulating char arrays.

mathew

Any chance you could tell me which filenames you're converting, and mabye post a gdb run?

bdufour

The names of the files I am converting are rather simple (e.g. heart_green). Here's the output from my gdb session: ---------- $ gdb icns2png GNU gdb 5.2.1 Copyright 2002 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i686-pc-linux-gnu"... (gdb) run heart_green Starting program: /home/bdufour/bin/icns2png heart_green Icon2PNG Linux Edition - (C) 2002 Mathew Eis Converting heart_green to heart_green.png... Program received signal SIGSEGV, Segmentation fault. 0x40191a5e in _int_malloc () from /lib/libc.so.6 ---------- Thanks for your help.

mathew

Thanks for the gdb post... Good call on the filename char arrays. It would technically die any time the new title was longer than the old one, since I allocated the old title's size for the new one. This explains why some people thought you needed the .icns extension - It wouldn't segfault on the filenames. I'll post a fixed version this afternoon.

bdufour

... a lot for your help!

Luke

icns2png: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory Reckon you could link a version with libc6?

mathew

Luke, Sorry I took so long to respond. Could you clue be in a bit more?... I thought I had linked it with libc6. ( I built it on a borrowed RH 8.0 system ) Here is a copy of the essential parts of my Makefile: ------------------------------------ # Makefile for Icns2PNG, MacOS X / Linux # Copyright (C) 2002 Mathew Eis # version number version=0.2b # where make install puts icns2png prefix=/usr/local # Where the libpng and zlib library and include files are located LPNGINC=libpng-1.2.5 ZLIBINC=zlib-1.1.4 LPNGLIB=libpng-1.2.5 ZLIBLIB=zlib-1.1.4 CC=c++ CFLAGS=-O -I$(LPNGINC) -I$(ZLIBINC) CPPFLAGS=$(CFLAGS) LDFLAGS=-L. -L$(LPNGINC) -L$(ZLIBLIB) -lpng12 -lz -lm LDFLAGS_A=-L$(LPNGINC) -L$(ZLIBLIB) $(LPNGLIB)/libpng.a -lz -lm OBJS = icns2png.o iconvert.o pngwriter.o byteswap.o all: icns2png test: icns2png @cd test; rm -f OmniWeb.png Snow.png; \ if ../icns2png OmniWeb.icns Snow; then \ echo 'Icns2PNG test successful!'; \ else \ echo 'Icns2PNG test failed internal error'; \ fi; cd ..; install: icns2png install -m 755 -o root -g wheel icon2png $(prefix)/bin release: icns2png test @mkdir -p icon2png-$(version); \ cp icns2png icon2png-$(version); \ cp README icon2png-$(version); \ rm -f icon2png-$(version).tar; \ tar -cf icon2png-$(version).tar icon2png-$(version); \ rm -rf icon2png-$(version); \ echo 'Icns2PNG $(version) release package created.'; \ rm -f *.o; icns2png: $(OBJS) $(CC) -o icns2png $(CFLAGS) $(OBJS) $(LDFLAGS_A) clean: rm -f *.o icns2png --------------------------- Let me know what to change for you.

Yaba

Execute ldd to see the dependencies

ecke

How do you actually unstuff the .sit.hqx files? I have run unstuff twice, first on the .hqx and then on the .sit and just end up with some 0 byte files and sometimes a file of some kb that aren't icon files. Any hint welcome.

Luke

When you unstuff, use unstiff -m=on

Luke

ok that was an unfortunate typo :)

shok

a great work for a great program. fantastic work. thanks

Tachyon

Am I missing something? Is there a way to convert all the files in a directory at once? I tried normal wildcards, but it didn't work. Any help or ideas whould be greatly appreciated. TIA ps. great prog. I've been wanting something like this for awhile.

Yaba

I don't know the syntax of this program, but I assume it works like icon2png mac.icn new.png then type something like this on your friendly bash: for i in (find . -name \*.icn); do icon2png $i ${i%icn}png done

Tachyon

Thanks I actually came up with almost the same thing on my own since my last post, but yours is a bit cleaner..... I'm still learnig shell scripting.

Pling
0 Affiliates
Details
license
version 1.4
updated
added
downloads 24h 0
mediaviews 24h 0
pageviews 24h 1

Other Icon Sub-Sets:

Gajim Ubuntu Iconset
draco
last update date: 18 years ago

Score 5.0

MyOxygen-Shell
elav
last update date: 11 years ago

Score 5.3

Kubuntu Cloud Folder
DanteAshton
last update date: 15 years ago

Score 5.7

Mozilla Icons for BC Tango
morph027
last update date: 18 years ago

Score 5.7

Chricons
chriscenery
last update date: 17 years ago

Score 5.0

Mimetype icons for LibreOffice
Magog64
last update date: 13 years ago

Score 5.0



System Tags