Closed Bug 1680834 Opened 3 years ago Closed 3 years ago

Screenshot image format not matching expected format by file extension

Categories

(Firefox :: Screenshots, defect)

Firefox 84
defect

Tracking

()

RESOLVED DUPLICATE of bug 1649915

People

(Reporter: wademon, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:84.0) Gecko/20100101 Firefox/84.0

Steps to reproduce:

Take a screenshot of a (large) page, save screenshot as "filename.png"

Actual results:

Screenshot saved as "filename.png" but the image is actually JPEG

Expected results:

Screenshot saved as "filename.png" and the image format to match one of the permitted extensions in the file dialog box ( https://searchfox.org/mozilla-central/source/toolkit/content/filepicker.properties#8 )

As pointed out in Bug 1649915 the Javascript side dynamically decides whether to save the screenshot as PNG (only if small enough) or JPEG (only if above an internal, unchangeable threshold).

Additionally the UI doesn't reflect that the user has no choice on formats. Instead it appears as if you could save your screenshot as any of the listed formats (see filepicker) which is not true.

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Screenshots

Thanks for pointing this out. This is another reason to simplify this code as the choices we're purporting to offer don't work reliably and/or lead to misunderstanding. I'm going to dupe this to bug 1649915, as I think the right fix here is to never save as JPEG and to remove that threshold and logic which tries to figure out which image type to use.

Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.