Attributes of demo icons

I want to use bitmaps and icons that are included in the wxPython-demo directory for my software.
How should I describe credit for the authorship of the icons?
Am I allowed to use them in commercial products?

I think that they mostly came from freely available collections, but I have not kept track of what came from where. Some are from the Tango icon collection, and are probably identifiable by their style. I also have folders on my system for Crystal project, Famfamfam, Open Icon Library, and JFA, so some of the icons in the demo may have come from those as well.

Since what’s in the demo is a mish-mash of stuff from all over the internet you may be better off picking an existing official collection like what’s mentioned above and then using them for your icons. It would be much easier to give attribution that way.

Hi Robin,

Thank you very much for the information.
I explored Tango Desktop Project and Famfamfam. They are great collections under public domains. In the Famfamfam collection, I also found some wxdemo icons that I like. :grinning:

I will do it that way. Many thanks!

You might also benefit from Iconfy icons . Most of them are uncoloured, though it might inspire you to be creative and brush them to your likings. Enjoy.

Cheers, Thom

Hi Thom,

Thank you very much for the information! I really like the concept of “Freedom to choose icons”.
It is quite easy to embed icons in HTML pages, but I have no idea how to get bitmap icons for the wx desktop application…

P.S.
There seems to be a PyPI package of iconify for PyQt.

Kazuya, you’re welcome.

Short solution aka workaround. Iconify uses an icon-sets Github repo amongst some others hosted there.

In that repo there’s a collections.md which for every icon set contains a URL. Go there, download the URL’s target repo and do e.g. a batch convert with IrfanView from SVG to BMP.

I realize this could be a very short TLDR, so try some research yourself with above info first and let me know if you need more detail.

Good luck.

Cheers, Thom

1 Like

Also try wx.svg.SVGimage :partying_face:

@komoto48g just curious. Did you succeed?

Hi Thom,
Yeah, it worked. Thanks!
What I tried is

  1. Cloned “https://github.com/hfg-gmuend/openmoji” from GitHub.
  2. I searched for an icon code from which I wanted to get BMP.
  3. Wrote sample code like:
import wx.svg

def getbmp(f, w, h):
    img = wx.svg.SVGimage.CreateFromFile(f)
    bmp = img.ConvertToScaledBitmap(wx.Size(w, h))
    return bmp

bmp = getbmp(r"C:\usr\site\openmoji\color\svg\E283.svg", 32,32)

Then, I could get the bitmap successfully.
image

But it would be great if we could get it directly from the internet, like embedding it in an HTML page so:

<iconify-icon
    icon="openmoji:annoyed-face-with-tongue"
    width="32"
></iconify-icon>

Do you have any idea?

Sounds good. You mixed in your own creative twist.

Mmh… no idea at the moment.

OTOH I think you could write a tiny little wrapper for scraping/downloading a repo of choice. Walk it and verify file by file if it abides to a graphic format you want… SVG, PNG, JPG, ICO, BMP … the lot. Finally use your getbmp func for SVG and possibly add some other funcs for above mentioned formats.

Just a quick thought.

And read this SO answer which suggests using wx.Image w/ a wx.Inputstream. Try some research in that direction. Looks doable and promising.

Thank you for your suggestions!

Now you can get bitmap icons directly from the Internet.

  1. Go to Iconify site
  2. Select the icon you like and get the icon code,
    e.g. “openmoji:annoyed-face-with-tongue”.
  3. Do the following:
import wx.svg
import requests

def iconify(icon, w, h):
    url = "https://api.iconify.design/{}.svg".format(icon.replace(':', '/'))
    content = requests.get(url).content
    img = wx.svg.SVGimage.CreateFromBytes(content)
    bmp = img.ConvertToScaledBitmap(wx.Size(w, h))
    return bmp

bmp = iconify("openmoji:annoyed-face-with-tongue", 32, 32)

Enjoy “Freedom to choose icons”. :yum:

1 Like

Kudos for this very slick solution😎