Open stefanceriu opened 1 year ago
Thanks for the issue.
Does it mean the Matrix Rust SDK should handle PDF, videos, images (incl. SVG) etc. All kind of formats… just to generate a blurhash? It also means the SDK should handle proprietary formats, I imagine some non-royalty-free video or image formats.
That's a lot of code, a lot of dependencies, that is probably duplicated with what the targeted platform can already offer for free, don't you think?
I think the MSC is limited to images only: https://github.com/matrix-org/matrix-spec-proposals/pull/2448.
Sorry, this was only about images and thumbnails. I updated the description.
The issue currently is that there doesn't seem to be a well-maintained blurhash implementation in Rust. The "main" crate has not seen a release in 4 years and has had a few fixes since then that are not part of any release.
And there are a few other crates, none seem to stand out, and some are just forks of that crate to get the fixes in a release.
We could use https://evanw.github.io/thumbhash/, which comes with a Rust implementation, https://github.com/evanw/thumbhash/tree/main/rust?
I actually went with generating them on the client side as I already have the image loaded into memory following thumbnail generation.
Seeing as this is also questionable on your side I think best to just close this ticket.
Given that the Rust SDK allows to generate thumbnails for images, it would also be good if it generated a blurhash (or similar) in the process so the ticket can stay open imo.
Yeah, I think it's just no longer relevant for EX and thus for Stefan anymore.
While certain media uploading preprocessing tasks are more easily done on the final client (e.g. video file thumbnail generation) the blurhash generation for images and thumbnails should be done rust side.