lennart-rth / Live-Earth-Wallpapers

A collection of all earth related space Images in one script to set as your Desktop background.
GNU General Public License v3.0
300 stars 13 forks source link

The args parsing for the resolution messes with zoomed in goes/himawari/meteosat satellite images #7

Closed SteffenCucos closed 1 year ago

SteffenCucos commented 1 year ago

When you pass a zoom argument > 0 to goes/himawari/meteosat satellites, the args parsing code that applies the height/width will crop the (large for zoom levels > 1) image to the width/height in the args (default 1920*1080). This means most of the downloaded images will be cropped out, and the user has no control over where the crop happens.

reproduction steps:

python changeBackground.py -z 3 -s meteosat-9

See that the output image is much smaller than it should be, and that it's cropped in to mostly black

I recommend finding a way to scale the image down to the supplied resolution, rather than cropping OR Allow the user to pick which part of the image to zoom into (like what row column to use as the top left of the output image)

lennart-rth commented 1 year ago

This is fixed now. Simply by removing the default option for -width and -height. This consequently means that someone has to specify the image size (done with -w -he) when a custom image size is needed For example if the image size doesn't match the monitor size. And yes if, for example -z=3 , -w=200 and -he=200 is chosen, most of the image information is scaled down and never actually displayed. Therefore I recommend to choose -z and the image size appropriate. (If -z is small the image size should be small to. vice versa). If no size is passed the image will be saved in it's original size, only depending on the -z flag.

HOWEVER this topic of scaling, cropping and zooming the image is not worthy to extend on, since I have a major Update planed that will simplify and standardize this. So stay Tuned! ;)