It just so happens that many video codecs are based on image formats, so ffmpeg already has a lot of the complex machinery to do so available to also implement these image formats - internally it can just handle it as a single frame of video with specialized formats for that.
Imagemagick (and other tools) also work, but why use multiple pieces of software if you already is adequate? ImageMagick is also software, and can also have vurnabilities.
if you upload any image on lemmy, it goes through ffmpeg to be converted into a webp file.
now, you can feed arbitrary input to that ffmpeg process
I never thought of doing that with ffmpeg. Why ffmpeg, instead of imagmagick?
ffmpeg is on any system, has a consistent user interface for many different conversions
It just so happens that many video codecs are based on image formats, so ffmpeg already has a lot of the complex machinery to do so available to also implement these image formats - internally it can just handle it as a single frame of video with specialized formats for that.
Imagemagick (and other tools) also work, but why use multiple pieces of software if you already is adequate? ImageMagick is also software, and can also have vurnabilities.