diff --git a/moon_composite.py b/moon_composite.py index 357a71f..0c0631f 100755 --- a/moon_composite.py +++ b/moon_composite.py @@ -250,6 +250,9 @@ def composite_full_moon( target_size = int(round(output_size[1] * moon_height_pct)) target_size += target_size % 2 # even ref_resized = ref.resize((target_size, target_size), LANCZOS) + ref_resized = ref_resized.filter( + ImageFilter.UnsharpMask(radius=2, percent=160, threshold=2) + ) # ── Phase shadow (skip when essentially full) ── illum = moon_phase.illumination(when_utc) @@ -260,9 +263,6 @@ def composite_full_moon( # ── Parallactic-angle rotation ── par = moon_phase.parallactic_angle(when_utc) - # PIL rotates counter-clockwise for positive angles; we want celestial - # north to end up "up" in the camera image. Negate so the rotation - # direction matches image-space y-down convention. ref_rot = ref_resized.rotate(-par, resample=BICUBIC, expand=False) # ── Composite with feathered circular mask ── @@ -311,6 +311,9 @@ def render_phase_closeup( target = int(round(output_size[1] * moon_height_pct)) target += target % 2 moon_resized = moon.resize((target, target), LANCZOS) + moon_resized = moon_resized.filter( + ImageFilter.UnsharpMask(radius=2, percent=160, threshold=2) + ) # Rotate by parallactic angle so "up" on the moon matches east's sky if when_utc is not None: