Open Olf0 opened 8 months ago
One solution would be to transcode the PNG into a JPEG file in the routine looking for cover art. I mean, copy (as done now) if the source file is a JPEG one, and use QImage
to transcode into a JPEG if the source file is in a different format.
One solution would be to transcode the PNG into a JPEG file in the routine looking for cover art. I mean, copy (as done now) if the source file is a JPEG one, and use
QImage
to transcode into a JPEG if the source file is in a different format.
Absolutely true, that would alleviate the need to alter many code locations, the only drawback is the loss of image quality, which can become well visible if an image contains high contrast edges.
Thinking about it, technically it would be better to transform al cover art into a lossless compressing format: The best candidate is likely PNG.
This still would be not very intrusive (simply exchanging the extension JPEG with PNG at all these locations), but might require a migration function, or discarding and rebuilding the cover art cache.
Currently the C++ code only supports the file suffix
jpeg
andjpg
, see https://github.com/search?q=repo%3Asailfishos-applications%2Fflowplayer+path%3A%2F%5Esrc%5C%2F%2F+media-art%2Falbum&type=codeAll these location might be altered to also accept
png
. Note that only this code section is already prepared for this: https://github.com/sailfishos-applications/flowplayer/pull/75/files#diff-380f2b4fb214da5db2e2f6c4d0c1f8d22f2d74b1fbe40671cb3966c6900fc6b6R217-R232