boramalper / himawaripy

Set near-realtime picture of Earth as your desktop background
http://labs.boramalper.org/himawaripy
MIT License
1.62k stars 239 forks source link

Overlay Himawari output onto a specified background image #87

Closed cameronleger closed 7 years ago

cameronleger commented 7 years ago

This is something I've had setup for a while before I decided to clean it up and submit. I use this to mask out the image of Earth and place it centered on an image of the Milky Way as seen from Earth, and I think it significantly enhances the overall look, although this implementation accepts any image as the background.

Basically, I'm scaling and centering the Himawari image on an image that matches the size of the provided image, then making a mask to paste only the Earth portion back onto the provided image. This image is then set as the background. It's optional and only happens if an image was provided with the new --composite-over parameter. Invalid images or paths will quit before downloading Himawari.