mautrix / whatsapp

A Matrix-WhatsApp puppeting bridge
https://maunium.net/go/mautrix-whatsapp
GNU Affero General Public License v3.0
1.21k stars 170 forks source link

Support sending heic images #636

Open raphaelcastaneda opened 12 months ago

raphaelcastaneda commented 12 months ago

Implements feature request mautrix/whatsapp#635 by converting heic files to jpeg before attaching to a message

tulir commented 11 months ago

That library looks unmaintained and doesn't work on arm/arm64. The amount of C code in general should also be minimized, I don't think there are any Go heif decoders.

raphaelcastaneda commented 11 months ago

There appears to be a fork of that library that does have arm support, but I'm not sure whether it's worth pursuing that given your other concerns.

kinduff commented 4 months ago

@raphaelcastaneda Maybe https://github.com/klippa-app/go-libheif could work

raphaelcastaneda commented 4 months ago

@raphaelcastaneda Maybe klippa-app/go-libheif could work

This is a (really thin) wrapper around the much more active library: https://github.com/strukturag/libheif, so I'd opt to use that directly instead.

I think it's a question for @tulir whether usage of that library here is acceptable. This library is also based on a C implementation, but at least the underlying library (https://github.com/strukturag/libde265) appears to have arm support.

niebloomj commented 4 months ago

Why do we want the bridge to support a file type that whatsapp doesn't?

tamcore commented 4 months ago

Why do we want the bridge to support a file type that whatsapp doesn't?

That's the whole point. So the bridge can convert it to a supported format.

niebloomj commented 4 months ago

Makes sense 👍