Skip to main content

prepare_wallpaper_preview

Function prepare_wallpaper_preview 

Source
pub fn prepare_wallpaper_preview(
    chat_npub: &str,
    file_path: &str,
) -> Result<WallpaperPreview, String>
Expand description

Validate + prepare a picked image: enforce the 5 MB cap, image-only mime, extract first frame for animated formats, write to the per-chat preview slot. The returned path is what the chat background should switch to while the Confirm/Cancel bar is showing.