flameshot-org / flameshot

Powerful yet simple to use screenshot software :desktop_computer: :camera_flash:
https://flameshot.org
GNU General Public License v3.0
24.99k stars 1.6k forks source link

Document File Format Support + Setup #3057

Open karlhorky opened 1 year ago

karlhorky commented 1 year ago

Feature Description

Hi Flameshot maintainers! 👋 Thanks for your continuing work here, really great tool.

It seems that the release notes of v11.0 Beta mention support for "Every file format supported by your underlying system", which is great! 🙌

However, it seems that there are details about how to set up eg. AVIF (and maybe other file formats as well). It would be nice to get official, maintained documentation on how to add support for popular file formats such as AVIF on all OSes.


Original issue text: Since AVIF is now supported in 79% of browsers (with Safari in macOS Ventura and iOS 16 supporting it), would you consider adding this as an output format for screenshots? This would allow for smaller images.

mmahmoudian commented 1 year ago

Thank you for making a feature request. I suggest you to search for things before making a new feature request as it saves your time. 😉

As of #1680 (2021-07-31) we allow saving in any supported format. In the screenshot below:

  1. This is where you can find it (if you have the updated version of Flameshot)
  2. Github itself does not support this format

image

karlhorky commented 1 year ago

I suggest you to search for things before making a new feature request as it saves your time

I did search with multiple search terms. That search link you provided does not return the issue #1680, nor is AVIF mentioned in #1680.

Also, it's unclear what a "supported format" means:

  1. Supported by which software?
  2. Once we know what the software is that should support the file format, where exactly can a user find the supported list of file formats for this software? If this is dependent on the OS, where can users find support lists for older versions of the OS?

Eg. I tried the latest released version (v12.1.0, released 3 July 2022), and there is no option to save AVIF files on macOS (see version details below):

Flameshot v12.1.0 (96c2c82e)
Compiled with Qt 5.15.5

darwin: 22.2.0
osx: 13.1

I checked for updates, but Flameshot reports that there are no new updates available.

mmahmoudian commented 1 year ago

I did search with multiple search terms. That search link you provided does not return the issue #1680, nor is AVIF mentioned in #1680.

It does, it returns 4 issues (one of which is this one), and in #1640 which is titled "Add support for the H265 file extension to save space" if you do Ctrl+f and "AVIF" you will find all the references.

If this is dependent on the OS

yes, whatever you have the libraries installed for

where can users find support lists for older versions of the OS?

¯\_(ツ)_/¯ users are responsible to know their operating system and their software stack. We at Flameshot cannot provide technical support for all the OSs under the sun (pun not intended) ;)

I tried the latest released version (v12.1.0, released 3 July 2022), and there is no option to save AVIF files on macOS

I am not a macOS user, but perhaps you can try installing appropriate libs (e.g libavif). On Arch Linux sudo pacman -S libavif should do the trick I guess.

I checked for updates, but Flameshot reports that there are no new updates available.

Yes, we have not released any stable version after v12.1.0, but this feature is merged mid 2021 and should be at least in the past 5 stable releases that we have released since 2021-07-21. If you want to live on the edge and use all the new and not stable features, you can of course build from the source.

karlhorky commented 1 year ago

Ok, understood. Looks like v11.0 Beta was the release with the change:

  • Every file format supported by your underlying system is now an option for file format when saving.

In my opinion, as a software package, it is the responsibility of Flameshot to its users to document these things, eg:

But I understand it's a community-run project and sometimes things are not completely documented.

However, that's also another good reason to open the issue - there were no other details specifically about AVIF in other issues or documentation, and now this issue serves as at least a rudimentary level of documentation for other users.

karlhorky commented 1 year ago

I am not a macOS user, but perhaps you can try installing appropriate libs (e.g libavif). On Arch Linux sudo pacman -S libavif should do the trick I guess.

The reason for these instructions above is still unclear to me. I don't understand what Flameshot is doing to check for "support" for a given file format on an operating system.

Given my experience with software packages which have dependencies on other software packages, usually the dependent package knows what other software packages it requires and has dependencies on. Therefore I was expecting my question of "Supported by which software?" to have a clear answer, something like:

But apparently it can support any binary that it finds? How would Flameshot know that I have some random AVIF encoding library installed on my OS and exactly where it is installed?

novomesk commented 1 year ago

Flameshot is Qt application and image formats are supported via plug-ins.

On Linux systems where the AVIF plugin is installed, Flameshot can save AVIF images. When the plug-in is not present, Flameshot cannot save AVIF images.

Installing libavif is not enough. My qt-avif-image-plugin uses libavif and libaom. I am able to build it on Linux and Windows. Unfortunately I cannot tell you how to built it on macOS, but I know that author of qView image viewer was able to do it.

karlhorky commented 1 year ago

@novomesk Thanks for the additional details!

@mmahmoudian since there are additional details about other packages here which are relevant, maybe this could indeed be fully documented by Flameshot. Would you be ok with reopening + renaming this issue (to add Flameshot documentation on how to enable support for file formats on all OSes)? If not, I can create another issue for this.

karlhorky commented 1 year ago

@mmahmoudian Thanks for reopening! I've also updated the title and description of the issue.

bugb commented 10 months ago

@mmahmoudian thank you so much for making the awesome software. Currently I am using Arch with the latest Flameshot version. I cannot find the format webp when saving

image

I have installed the package libwebp btw.

Do you have any ideas?

onkoe commented 8 months ago

@bugb i don't use Arch, but on Fedora, it requires qt5-imageformats.

if you can find a similar package on your distribution, it should work out the same!

image