resurrecting-open-source-projects / scrot

SCReenshOT - command line screen capture utility
Other
495 stars 49 forks source link

Wrong extention when using --format flag #278

Closed Disonantemus closed 1 year ago

Disonantemus commented 1 year ago

Using: scrot --format webp resulting file was .png, expected was .webp, checking with medianinfo & ffmpeg says webp:

> mediainfo 2023-04-28-113049_1920x1080_scrot.png
General
Complete name                            : 2023-04-28-113049_1920x1080_scrot.png
Format                                   : WebP
File size                                : 88.2 KiB

Image
Format                                   : WebP
> ffprobe -hide_banner 2023-04-28-113049_1920x1080_scrot.png
Input #0, webp_pipe, from '2023-04-28-113049_1920x1080_scrot.png':
  Duration: N/A, bitrate: N/A
  Stream #0:0: Video: webp, yuv420p(tv, bt470bg/unknown/unknown), 1920x1080, 25 fps, 25 tbr, 25 tbn

It's safe to just rename to webp?

N-R-K commented 1 year ago

It's safe to just rename to webp?

Extension doesn't really change the file itself. So you're free to rename it to webp or whatever else.

But anyhow, creating a webp/jpg ...etc file with .png extension is confusing. We should fix that.