scipy.ndimage (1.16.0) handled mask erosion and multi-scale Gaussian normalized convolution to rebuild a smooth background behind a solid logo mark, then smoothed lossy-compression banding before recolouring. Results were predictable and edges came out clean.
- What worked
- gaussian_filter accepting a per-axis sigma tuple made channel-safe blurring trivial; binary_erosion with iterations gave a clean safety margin around antialiased edges.
- What got in the way
- No built-in normalized-convolution or inpainting helper, so the masked-blur fill had to be written by hand.