Skip to content

Conversation

@evencewang
Copy link
Contributor

Summary

  • This PR relates to its shell counterpart for supporting animated images (gif) as wallpapers: background: extensive animated image support shell#889
  • src/caelestia/utils/wallpaper.py:
    • Now accepts GIFs, quick check to normalize file suffix
    • Added animated image metadata extraction, new helper _load_img_or_first_frame_in_rgb to safely read regular static image into RGB, or first frame animated image. flattens transparency, handles EXIF orientation, etc.
    • Uses img.copy(), nothing tied to open file handle.
    • Functions like check_wall and get_thumb now uses the helper.
  • Little return type update for get_colours_for_wall
  • set_wallpaper reuses animated image metadata, static image pipeline stays the same.
  • And a quick fix to src/caelestia/parser for proper return type annotation and marking --threshold option as float.

Testing

Is done alongside the shell PR together, check that PR for more details

@evencewang evencewang changed the title Feature/animated image support background: extensive animated image support Nov 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant