333bf120a5
- Keep main's media_write_timeout=60s (PR's HERMES_* env var dropped per .env-is-secrets-only policy; main already fixed the timeout half). - Replace stdlib imghdr (removed in Python 3.13) with a magic-byte sniff. - Exclude GIFs: JPEG conversion flattens animations to one frame. - Fix transparent-PNG handling: RGBA hit the len(getbands())==4 branch before the white-background composite, rendering transparency black. - Clean up temp JPEGs after send (both single and media-group paths); the docstring promised caller cleanup that neither call site did. - Write temp files via tempfile default dir instead of an undefined DEFAULT_OUTPUT_DIR (NameError at runtime in the original PR). - Add real-Pillow regression tests incl. a sabotage-verified white-background test.