jithurjacob / Windows-10-Toast-Notifications

Python library to display Windows 10 Toast Notifications
MIT License
970 stars 168 forks source link

Support for pictures or image files instead of icon #58

Open thorntonjonathanxu opened 4 years ago

thorntonjonathanxu commented 4 years ago

This is a bit similar to #46 but I was curious how to add images to the notifications. Similar to the news article notifications that you would see on the Windows Action Center, I'd love to be able to attach a picture with sizing dimensions in addition to my message.

The syntax could be something like this:

toaster.show_toast("Today's Weather!", 
                    "It's Cloudy Today",
                    image_path="http://icon-park.com/imagefiles/simple_weather_icons_cloudy.png",
                    image_width="600px",
                    image_height="600px",
                   icon_path="custom.ico",
                   duration=10)
Frozander commented 4 years ago

I have dug around the code a bit and I don't think that is possible.

Since this library uses pywin32 and pywin32 does not support the notification API in Windows 10 (which normally uses C#) the most you can get is to be able to convert an image to .ico

I have implemented IMAGE TO ICO haphazardly but I do not think it is a desired feature