Display animated gifs in Gallery as, well, animated gifs

Can you post your SFOS version?

Can you append:
onStatusChanged: playing = (status == AnimatedImage.Ready)

to line 23 in /usr/lib64/qt5/qml/Sailfish/Silica/Background/ImageWallpaper.qml and restart lipstick? I’m thinking maybe the more recent versions of AnimatedImage are not playing by default.

4.4.0.68 …

I think it may have to do with AnimatedLoader. I only have your patch, so here the current qml:

AnimatedImage {

    property url imageUrl
    property string wallpaperFilter

    asynchronous: AnimatedLoader.asynchronous

    //sourceSize.height: Screen.height
    //cache: false
    cache: true
    source: imageUrl != ""
            //? "image://silica-square/" + encodeURIComponent(imageUrl)
            ? imageUrl
            : ""

    AnimatedLoader.status: {
        switch (status) {
        case Image.Loading: return AnimatedLoader.Loading
        case Image.Ready: return AnimatedLoader.Ready
        case Image.Null:
        case Image.Error:
        default: return AnimatedLoader.Error
        }
    }

    onStatusChanged: playing = (status == AnimatedImage.Ready)
}

Try this:

AnimatedImage {
    property url imageUrl
    property string wallpaperFilter

    asynchronous: AnimatedLoader.asynchronous
    // sourceSize.height: Screen.height
    cache: true
    smooth: false
    source: imageUrl != ""
            ? imageUrl
            : ""
    onStatusChanged: playing = (status == AnimatedImage.Ready)

    AnimatedLoader.status: {
        switch (status) {
        case Image.Loading: return AnimatedLoader.Loading
        case Image.Ready: return AnimatedLoader.Ready
        case Image.Null:
        case Image.Error:
        default: return AnimatedLoader.Error
        }
    }
}

Wait wait…I think I know what’s up. Let me upload an ambience to install. IIRC the ambience creator ends up converting the gif to a png or something. If you edit the ambience directly and dictate the gif it works.

@poetaster Do a pull on the repo to grab one of the animated ambiences. Copy them individually into /usr/share/ambience/ then restart lipstick. If they don’t show up in the ambience list, remove one or more of the canned ones under /usr/share/ambience/ and restart lipstick again. Fingers crossed!

–HM

Nope. I mean, I really don’t want animated wallpaper, so it’s probably a good thing ™.

I tried some variations with asynchronous: AnimatedImage.Ready and status but there seems to be something else in play. Maybe ThemeImageWallpaper.qml?

Converts them to jpegs that live in: /home/defaultuser/.local/share/ambienced/wallpapers … uhg.

I managed to get gifs to run on SFOS some years back. The file I edited was found in lipstick-jolla-home-qt5/compositor/HomeWallpaper.qml but since many OS versions ago, that file has gone.

I’ve tried with Wallpaper.qml in the compositor directory, but no dice. I have a few animated ambience packages, on reflection I think they are all quite crap!!, stuff I am not interested in and last time I played with animated ambience, battery drain was most certainly a real issue.

This is possible to do with the patches above. The catch is that ambiences need to be hand edited to select an gif file. Using any of the ambience integration to create an ambience will result in a static PNG begin captured. Let me know if you’re interested and I can help.

1 Like