

Below, you can see my prefered set of icons. The icons that I use are transparent png-images with a size of 40×40 pixels. Os.system("convert webcam.jpg \"%s\" -geometry +\"%s\"+\"%s\" -composite webcam.jpg" % (icon, xcoord, ycoord)) If '09d.png' in icon or '09n.png' in icon or '10d.png' in icon or '10n.png' in icon or '11d.png' in icon or '11n.png' in icon or '13d.png' in icon or '13n.png' in icon or '50d.png' in icon or '50n.png' in icon: If '03d.png' in icon or '03n.png' in icon: # Calculate the position for the weather icon # Add the weather data os.system("convert webcam.jpg -undercolor lightblue -pointsize 16 -fill blue -annotate +6+399 \"%s\" webcam.jpg" % finalstr)

Os.system("convert webcam.jpg -sigmoidal-contrast 2,50% -modulate 100,112 -unsharp 2x0.5+0.5+0 webcam.jpg") Weatherstr = "Temperatur: " + temp + " ☌ - " + "Luftfeuchtigkeit: " + humi + " \% - " + "Luftdruck: " + press + " hPa" If you are using pictures of another size, you have to adapt the coordinates. Please note that the initial coordinates for the text and the icons are based on the size of my sample picture (640×42 7). This requires some kind of logic that is also included in the example below. Since the values can have differnet lengths and also can be negative, you have to take care of this, to always have the same spaces between the text and the icon. In my example, I also display the current weather conditions as an icon, just behind the text. In my follwing example, I will use data from OpenWeatherMap, but of course, you can also use data from your local sensors. This can easily be done by using the tool ImageMagick ( ). If you are using a webcam to monitor the weather conditions at your home, or any other place, you may also want to overlay the current date, time and weather data like temperatur, humidity and the barometric pressure for having a quick overview.
