# MDI PIL
This is a small library made to easily generate PIL Image objects of mdi
(Material Design Icon) icons. It also comes with a tool to convert user supplied image files into image objects that adhere to the main sizing principles of mdi icons.
There are also two additional functions, `parse_weather_icon` and `make_battery_icon`. The former returns a string with the mdi icon corresponding to a given weather condition. The latter creates an image that is similar to the icon showing the battery status in phones, with additional options like fill icons and the like. See the doc strings of those functions for how they work.
# Examples
Make an PIL image object of the icon "mdi:test-tube" and open a window to show it:
```
from PIL import Image
import mdi_pil as mdi
icon = "mdi:test-tube"
img = Image.new("RGBA", (100,100), None)
img = mdi.draw_mdi_icon(img, icon, icon_color="steelblue")
img.show()
```
Convert the image file "speaker-outline.png" into an mdi-like icon:
```
from PIL import Image
import mdi_pil as mdi
img = "speaker-outline.png"
img = mdi.make_mdi_icon(img, 100, color="steelblue")
img.show()
```
Raw data
{
"_id": null,
"home_page": null,
"name": "mdi-pil",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "mdi, MaterialDesignIcon, pictogrammers, mdi icons",
"author": "Slalamander",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/20/ed/6bdc917fa1e604a75ba8cb6605dbf8f71d602e1e8343bc6444d82083b2b5/mdi_pil-1.0.0.tar.gz",
"platform": null,
"description": "# MDI PIL\r\n\r\nThis is a small library made to easily generate PIL Image objects of mdi\r\n(Material Design Icon) icons. It also comes with a tool to convert user supplied image files into image objects that adhere to the main sizing principles of mdi icons.\r\nThere are also two additional functions, `parse_weather_icon` and `make_battery_icon`. The former returns a string with the mdi icon corresponding to a given weather condition. The latter creates an image that is similar to the icon showing the battery status in phones, with additional options like fill icons and the like. See the doc strings of those functions for how they work.\r\n\r\n\r\n# Examples\r\n\r\nMake an PIL image object of the icon \"mdi:test-tube\" and open a window to show it:\r\n\r\n```\r\nfrom PIL import Image\r\nimport mdi_pil as mdi\r\n\r\nicon = \"mdi:test-tube\"\r\nimg = Image.new(\"RGBA\", (100,100), None)\r\n\r\nimg = mdi.draw_mdi_icon(img, icon, icon_color=\"steelblue\")\r\nimg.show()\r\n```\r\n\r\nConvert the image file \"speaker-outline.png\" into an mdi-like icon:\r\n\r\n```\r\nfrom PIL import Image\r\nimport mdi_pil as mdi\r\n\r\nimg = \"speaker-outline.png\"\r\n\r\nimg = mdi.make_mdi_icon(img, 100, color=\"steelblue\")\r\nimg.show()\r\n```\r\n",
"bugtrack_url": null,
"license": null,
"summary": "A library to draw MDI icons onto PIL Image objects.",
"version": "1.0.0",
"project_urls": {
"Homepage": "https://github.com/Slalamander/mdi_pil"
},
"split_keywords": [
"mdi",
" materialdesignicon",
" pictogrammers",
" mdi icons"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "11755241cbe35f6fe3b01ca19adfc6fba716072c418f14deb3a76d2a69f3ad92",
"md5": "76072eb72936af96b8d7deeb8cb9065c",
"sha256": "fc6c180cb860eb0c44d9cffbcd9e4410e826fdb9784a273539864b602daaf860"
},
"downloads": -1,
"filename": "mdi_pil-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "76072eb72936af96b8d7deeb8cb9065c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 660305,
"upload_time": "2024-10-19T19:37:54",
"upload_time_iso_8601": "2024-10-19T19:37:54.632340Z",
"url": "https://files.pythonhosted.org/packages/11/75/5241cbe35f6fe3b01ca19adfc6fba716072c418f14deb3a76d2a69f3ad92/mdi_pil-1.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "20ed6bdc917fa1e604a75ba8cb6605dbf8f71d602e1e8343bc6444d82083b2b5",
"md5": "cfa2f51604425912852472ff8a164ef7",
"sha256": "aacfa51383d296911a54882dfa9ab5193d6047701cd61fbf48a517bf5ace78be"
},
"downloads": -1,
"filename": "mdi_pil-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "cfa2f51604425912852472ff8a164ef7",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 663678,
"upload_time": "2024-10-19T19:37:56",
"upload_time_iso_8601": "2024-10-19T19:37:56.764526Z",
"url": "https://files.pythonhosted.org/packages/20/ed/6bdc917fa1e604a75ba8cb6605dbf8f71d602e1e8343bc6444d82083b2b5/mdi_pil-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-19 19:37:56",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Slalamander",
"github_project": "mdi_pil",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "mdi-pil"
}