zzag / plasma5-wallpapers-dynamic

Dynamic wallpaper plugin for KDE Plasma
328 stars 18 forks source link

Bigger file sizes around %30 more #64

Closed Maximumtix closed 4 years ago

Maximumtix commented 4 years ago

Hi!, I really like your dynamic-wallpaper plugin. It's awesome.

I would like to ask: Is dynamic-wallpaper-converter's default quality max or 100?

And why am I getting different file sizes when I convert a macOS dynamic wallpaper and when I build using dynamic-wallpaper-builder with photos created in /tmp folder while dynamic-wallpaper-builder is working?

I would like to know how is builder different from converter in this manner.

Commands I use: kdynamicwallpaperbuilder --quality 100 --lossless ./dynamicwallpaperconverter --crossfade --quality 100

Thank you so much. Have a nice day.

zzag commented 4 years ago

I would like to ask: Is dynamic-wallpaper-converter's default quality max or 100?

By default, it's 100. But with https://github.com/zzag/plasma5-wallpapers-dynamic-extras/commit/bb9a4b3df2af560d5cfc477d62e72082398aa94c, it's possible to specify the desired image encoding quality.

zzag commented 4 years ago

And why am I getting different file sizes when I convert a macOS dynamic wallpaper and when I build using dynamic-wallpaper-builder with photos created in /tmp folder while dynamic-wallpaper-builder is working?

The file size should be the same since in both cases, everything boils down to using kdynamicwallpaperbuilder on the same set of images.

zzag commented 4 years ago

Prior to https://github.com/zzag/plasma5-wallpapers-dynamic-extras/commit/bb9a4b3df2af560d5cfc477d62e72082398aa94c, the converter script didn't specify any encoding quality value.

Judging by the source code of libheif, the default value for the quality param is 50, which corresponds to a CRF value of 25.

Given that the converter script passes the desired quality value now, this issue can be closed.