TobiZog / cinnamon-dynamic-wallpaper

Cinnamon extension for dynamic desktop backgrounds based on time and location
GNU General Public License v3.0
33 stars 0 forks source link

Importing an HEIC image fails #6

Closed ghost closed 8 months ago

ghost commented 1 year ago

I'm trying to import this HEIC image but the extension says "Input file is not an HEIF/AVIF file".

I've tried executing the extension by console like in issue #2,

~/.local/share/cinnamon/extensions/cinnamon-dynamic-wallpaper@TobiZog/5.4/image-configurator$ python3 image-configurator.py 
Input file is not an HEIF/AVIF file

Tried with another heic from the same website with no luck either, but this time going steps further onto importing.

~/.local/share/cinnamon/extensions/cinnamon-dynamic-wallpaper@TobiZog/5.4/image-configurator$ python3 image-configurator.py 
File contains 16 images
Written to /home/user/.local/share/cinnamon/extensions/cinnamon-dynamic-wallpaper@TobiZog/5.4/images/extracted/macOS Monterey-1.jpg
Written to /home/user/.local/share/cinnamon/extensions/cinnamon-dynamic-wallpaper@TobiZog/5.4/images/extracted/macOS Monterey-2.jpg
Written to /home/user/.local/share/cinnamon/extensions/cinnamon-dynamic-wallpaper@TobiZog/5.4/images/extracted/macOS Monterey-3.jpg
Written to /home/user/.local/share/cinnamon/extensions/cinnamon-dynamic-wallpaper@TobiZog/5.4/images/extracted/macOS Monterey-4.jpg
Written to /home/user/.local/share/cinnamon/extensions/cinnamon-dynamic-wallpaper@TobiZog/5.4/images/extracted/macOS Monterey-5.jpg
Written to /home/user/.local/share/cinnamon/extensions/cinnamon-dynamic-wallpaper@TobiZog/5.4/images/extracted/macOS Monterey-6.jpg
Written to /home/user/.local/share/cinnamon/extensions/cinnamon-dynamic-wallpaper@TobiZog/5.4/images/extracted/macOS Monterey-7.jpg
Written to /home/user/.local/share/cinnamon/extensions/cinnamon-dynamic-wallpaper@TobiZog/5.4/images/extracted/macOS Monterey-8.jpg
Written to /home/user/.local/share/cinnamon/extensions/cinnamon-dynamic-wallpaper@TobiZog/5.4/images/extracted/macOS Monterey-9.jpg
Written to /home/user/.local/share/cinnamon/extensions/cinnamon-dynamic-wallpaper@TobiZog/5.4/images/extracted/macOS Monterey-10.jpg
Written to /home/user/.local/share/cinnamon/extensions/cinnamon-dynamic-wallpaper@TobiZog/5.4/images/extracted/macOS Monterey-11.jpg
Written to /home/user/.local/share/cinnamon/extensions/cinnamon-dynamic-wallpaper@TobiZog/5.4/images/extracted/macOS Monterey-12.jpg
Written to /home/user/.local/share/cinnamon/extensions/cinnamon-dynamic-wallpaper@TobiZog/5.4/images/extracted/macOS Monterey-13.jpg
Written to /home/user/.local/share/cinnamon/extensions/cinnamon-dynamic-wallpaper@TobiZog/5.4/images/extracted/macOS Monterey-14.jpg
Written to /home/user/.local/share/cinnamon/extensions/cinnamon-dynamic-wallpaper@TobiZog/5.4/images/extracted/macOS Monterey-15.jpg
Written to /home/user/.local/share/cinnamon/extensions/cinnamon-dynamic-wallpaper@TobiZog/5.4/images/extracted/macOS Monterey-16.jpg

This seemed to work apparently but the image is not applied in my desktop or listed in the extension list.

If we assume the images are the problem, where are you getting those type of images? Or how do you create them?

EDIT: Using linux mint 21.2 Cinnamon edition.

Arnproj commented 12 months ago

Hi, i have the same problem. I can load the same .heic image but nothing appears on the desktop, previews don't work either. Linux Mint 21.2 Cinnamon (Cinnamon 5.8.4).

TobiZog commented 12 months ago

I've tested it with the same file and it worked for me. Did you have additional information, so I can reproduce the bug?

image

Arnproj commented 12 months ago

thanks for the test. the file is in /home/arno/Images/Wallpapers/Dynamic for me. should I import it from somewhere else?

the result for me :

2023-10-09_13-42

TobiZog commented 12 months ago

thanks for the test. the file is in /home/arno/Images/Wallpapers/Dynamic for me. should I import it from somewhere else?

The folder is wrong. The extension have to be placed here: image

I would recommend the extension manager of Cinnamon. In the "Download" tab is the latest version of the Cinnamon Dynamic Wallpaper available. Did you test this installation method?

Arnproj commented 12 months ago

The extension is in the right directory, it is the image I want to import which is in my images.

image I installed the application via cinnamon extensions.

image

in the log file : 13:40:35 Set new image: file:///home/arno/.local/share/cinnamon/extensions/cinnamon-dynamic-wallpaper@TobiZog/5.4/images/selected/null 13:40:35 Location updated 13:40:34 Set new image: file:///home/arno/.local/share/cinnamon/extensions/cinnamon-dynamic-wallpaper@TobiZog/5.4/images/selected/null 13:40:34 Location updated 13:40:34 Set new image: file:///home/arno/.local/share/cinnamon/extensions/cinnamon-dynamic-wallpaper@TobiZog/5.4/images/selected/null 13:40:34 Location updated 13:40:34 Set new image: file:///home/arno/.local/share/cinnamon/extensions/cinnamon-dynamic-wallpaper@TobiZog/5.4/images/selected/null

image

ghost commented 12 months ago

I've tested it with the same file and it worked for me. Did you have additional information, so I can reproduce the bug?

I don't want to look rude but I detailed every step I do when I import a HEIC image. Please tell me whatever you need and I'll provide you.

Maybe if you try it on a fresh install on a VM you can reproduce same behaviour? Perhaps you have some packages we don't? Maybe is a python-related issue?

I'm having the same logs as @Arnproj.

Trying to import an HEIC:

22:59:51    Main loop runs...
22:59:44    Set new image: file:///home/user/.local/share/cinnamon/extensions/cinnamon-dynamic-wallpaper@TobiZog/5.4/images/selected/null
22:59:44    Location updated
22:59:43    Set new image: file:///home/user/.local/share/cinnamon/extensions/cinnamon-dynamic-wallpaper@TobiZog/5.4/images/selected/null
22:59:43    Location updated
22:59:43    Set new image: file:///home/user/.local/share/cinnamon/extensions/cinnamon-dynamic-wallpaper@TobiZog/5.4/images/selected/null
22:59:43    Location updated
22:59:43    Set new image: file:///home/user/.local/share/cinnamon/extensions/cinnamon-dynamic-wallpaper@TobiZog/5.4/images/selected/null
22:59:43    Location updated
22:59:43    Set new image: file:///home/user/.local/share/cinnamon/extensions/cinnamon-dynamic-wallpaper@TobiZog/5.4/images/selected/null
22:59:43    Location updated
22:59:43    Set new image: file:///home/user/.local/share/cinnamon/extensions/cinnamon-dynamic-wallpaper@TobiZog/5.4/images/selected/null
22:59:43    Location updated
22:59:43    Set new image: file:///home/user/.local/share/cinnamon/extensions/cinnamon-dynamic-wallpaper@TobiZog/5.4/images/selected/null
22:59:43    Location updated
22:59:43    Set new image: file:///home/user/.local/share/cinnamon/extensions/cinnamon-dynamic-wallpaper@TobiZog/5.4/images/selected/null
22:59:43    Location updated
22:59:42    Set new image: file:///home/user/.local/share/cinnamon/extensions/cinnamon-dynamic-wallpaper@TobiZog/5.4/images/selected/null
22:59:42    Location updated
22:58:51    Main loop runs...

Setting an already existing image from default installation ("gradient" in this case):

23:13:51    Main loop runs...
23:13:38    Set new image: file:///home/user/.local/share/cinnamon/extensions/cinnamon-dynamic-wallpaper@TobiZog/5.4/images/selected/9.jpg
23:13:38    Location updated
23:13:38    Set new image: file:///home/user/.local/share/cinnamon/extensions/cinnamon-dynamic-wallpaper@TobiZog/5.4/images/selected/9.jpg
23:13:38    Location updated
23:13:38    Set new image: file:///home/user/.local/share/cinnamon/extensions/cinnamon-dynamic-wallpaper@TobiZog/5.4/images/selected/9.jpg
23:13:38    Location updated
23:13:37    Set new image: file:///home/user/.local/share/cinnamon/extensions/cinnamon-dynamic-wallpaper@TobiZog/5.4/images/selected/9.jpg
23:13:37    Location updated
23:13:37    Set new image: file:///home/user/.local/share/cinnamon/extensions/cinnamon-dynamic-wallpaper@TobiZog/5.4/images/selected/9.jpg
23:13:37    Location updated
23:13:37    Set new image: file:///home/user/.local/share/cinnamon/extensions/cinnamon-dynamic-wallpaper@TobiZog/5.4/images/selected/9.jpg
23:13:37    Location updated
23:13:37    Set new image: file:///home/user/.local/share/cinnamon/extensions/cinnamon-dynamic-wallpaper@TobiZog/5.4/images/selected/9.jpg
23:13:37    Location updated
23:13:37    Set new image: file:///home/user/.local/share/cinnamon/extensions/cinnamon-dynamic-wallpaper@TobiZog/5.4/images/selected/9.jpg
23:13:37    Location updated
23:13:37    Set new image: file:///home/user/.local/share/cinnamon/extensions/cinnamon-dynamic-wallpaper@TobiZog/5.4/images/selected/9.jpg
23:13:37    Location updated
23:12:51    Main loop runs...
Arnproj commented 12 months ago

I found an alternative to make the dynamic wallpaper work, it's not clean but it works. Converstion from .heic to .jpg and replace the images of an existing set.

image

I think I have a problem with the .heic format but the mint viewer can read it and I am up to date with the version. image

TobiZog commented 11 months ago

I've tested it with the same file and it worked for me. Did you have additional information, so I can reproduce the bug?

I don't want to look rude but I detailed every step I do when I import a HEIC image. Please tell me whatever you need and I'll provide you.

Maybe if you try it on a fresh install on a VM you can reproduce same behaviour? Perhaps you have some packages we don't? Maybe is a python-related issue?

I'm having the same logs as @Arnproj.

Trying to import an HEIC:

22:59:51  Main loop runs...
22:59:44  Set new image: file:///home/user/.local/share/cinnamon/extensions/cinnamon-dynamic-wallpaper@TobiZog/5.4/images/selected/null
22:59:44  Location updated
22:59:43  Set new image: file:///home/user/.local/share/cinnamon/extensions/cinnamon-dynamic-wallpaper@TobiZog/5.4/images/selected/null
22:59:43  Location updated
22:59:43  Set new image: file:///home/user/.local/share/cinnamon/extensions/cinnamon-dynamic-wallpaper@TobiZog/5.4/images/selected/null
22:59:43  Location updated
22:59:43  Set new image: file:///home/user/.local/share/cinnamon/extensions/cinnamon-dynamic-wallpaper@TobiZog/5.4/images/selected/null
22:59:43  Location updated
22:59:43  Set new image: file:///home/user/.local/share/cinnamon/extensions/cinnamon-dynamic-wallpaper@TobiZog/5.4/images/selected/null
22:59:43  Location updated
22:59:43  Set new image: file:///home/user/.local/share/cinnamon/extensions/cinnamon-dynamic-wallpaper@TobiZog/5.4/images/selected/null
22:59:43  Location updated
22:59:43  Set new image: file:///home/user/.local/share/cinnamon/extensions/cinnamon-dynamic-wallpaper@TobiZog/5.4/images/selected/null
22:59:43  Location updated
22:59:43  Set new image: file:///home/user/.local/share/cinnamon/extensions/cinnamon-dynamic-wallpaper@TobiZog/5.4/images/selected/null
22:59:43  Location updated
22:59:42  Set new image: file:///home/user/.local/share/cinnamon/extensions/cinnamon-dynamic-wallpaper@TobiZog/5.4/images/selected/null
22:59:42  Location updated
22:58:51  Main loop runs...

Setting an already existing image from default installation ("gradient" in this case):

23:13:51  Main loop runs...
23:13:38  Set new image: file:///home/user/.local/share/cinnamon/extensions/cinnamon-dynamic-wallpaper@TobiZog/5.4/images/selected/9.jpg
23:13:38  Location updated
23:13:38  Set new image: file:///home/user/.local/share/cinnamon/extensions/cinnamon-dynamic-wallpaper@TobiZog/5.4/images/selected/9.jpg
23:13:38  Location updated
23:13:38  Set new image: file:///home/user/.local/share/cinnamon/extensions/cinnamon-dynamic-wallpaper@TobiZog/5.4/images/selected/9.jpg
23:13:38  Location updated
23:13:37  Set new image: file:///home/user/.local/share/cinnamon/extensions/cinnamon-dynamic-wallpaper@TobiZog/5.4/images/selected/9.jpg
23:13:37  Location updated
23:13:37  Set new image: file:///home/user/.local/share/cinnamon/extensions/cinnamon-dynamic-wallpaper@TobiZog/5.4/images/selected/9.jpg
23:13:37  Location updated
23:13:37  Set new image: file:///home/user/.local/share/cinnamon/extensions/cinnamon-dynamic-wallpaper@TobiZog/5.4/images/selected/9.jpg
23:13:37  Location updated
23:13:37  Set new image: file:///home/user/.local/share/cinnamon/extensions/cinnamon-dynamic-wallpaper@TobiZog/5.4/images/selected/9.jpg
23:13:37  Location updated
23:13:37  Set new image: file:///home/user/.local/share/cinnamon/extensions/cinnamon-dynamic-wallpaper@TobiZog/5.4/images/selected/9.jpg
23:13:37  Location updated
23:13:37  Set new image: file:///home/user/.local/share/cinnamon/extensions/cinnamon-dynamic-wallpaper@TobiZog/5.4/images/selected/9.jpg
23:13:37  Location updated
23:12:51  Main loop runs...

Can you please send me the content of the config file? The "tv_logs" section is not necessary. You find it here: /home/.config/cinnamon/spices/cinnamon-dynamic-wallpaper@TobiZog/cinnamon-dynamic-wallpaper@TobiZog.json

Description: The python script stores the selected images in the file, so the JavaScript extension can access the name of the right image (e.g. "etr_img_sunrise" contains the image, which will be displayed at sunrise).

Arnproj commented 11 months ago

here is my file.

cinnamon-dynamic-wallpaper@TobiZog.json

ghost commented 11 months ago

Can you please send me the content of the config file? The "tv_logs" section is not necessary. You find it here: /home/.config/cinnamon/spices/cinnamon-dynamic-wallpaper@TobiZog/cinnamon-dynamic-wallpaper@TobiZog.json

Here your are, sir :)

TobiZog commented 11 months ago

They look booth correct. Could you please send me a screenshot of the contents in the selected images folder?

Location is: ~/.local/share/cinnamon/extensions/cinnamon-dynamic-wallpaper@TobiZog/5.4/images/selected/

E.g.: image

ghost commented 11 months ago

Both selected and extracted images folder looks good:

image

image

Done by console through python3 image-configurator.py and the output was clean. I tested this by first applying a working included image set, then trying to import HEIC image. Extraction output has no errors, and as you can see in the pictures, selected images are being copied in "selected" folder too, but desktop background is not changing at all.

This is the appearance of the main window after been selected the heic image from the browser window and previous clicking on Apply:

image

Once you click Apply, Image-configurator closes, and if you open it again, this is how it looks:

image

As said before, selected and extracted folder works as expected in my case (if I change to an included image set, the selected folder changes, removing old files (monterrey's heic in this case) and copying the new ones).

EDIT: tried to remove spaces to the filename. No changes.

EDIT 2: Okay...didn't see that select box :angry:

image832

Okay so I guess this heic file has so many pictures (expected 9 I guess) that it didn't auto-fill in every time set (Morning, sunrise, etc) so I had to choose manually from the select box which picture I wanted for every hour.

Conclusion: I think the bug is related to 1) how many pictures does the HEIC file contains and 2) I haven't tried with a HEIC file that contains exactly 9 pictures but now question is, it would fit in every frame automatically?

I can close the issue if you think I should...maybe I'll try with another heic file tomorrow before.


EDIT 3: I've tried different HEIC files from same site. Some of them include only 3 files, another one 6, but this one contained 9 files and it didn't worked either.

Arnproj commented 11 months ago

For me the problem seems to be here. No extract when i choose a .heic file.

image

TobiZog commented 8 months ago

The issue is fixed with the latest commit. Version 2.0 coming in the next days. Thanks for your help!