Corrupted image when saved w/o filename extension



17 years ago
2 years ago


(Reporter: benjamin, Unassigned)


Mac OS X

Firefox Tracking Flags

(Not tracked)




17 years ago
Save any image (gif or jpeg) and remove the extension

Ex: myimage.gif -> myimage

Then save the file. 

Result: image is corrupted.

Mozilla 1.1b
Mozilla/5.0 (Macintosh; U; PPC; en-US; rv:1.1b) Gecko/20020816
worksforme linux trunk cvs 2002-08-19, tried with a jpeg image. Reporter, can
you add a link to an image with which this bug occurs? How do you determine that
the image is corrupted?

Comment 2

17 years ago
hmmm I filed this bug on the behalf of someone else... I tried with photoshop
and it's fully reproducible but I can't reproduce with other apps like graphic
converter and PictureViewer as he can. Anyway here the recipe for photoshop:

Go to 
Save the header image via the contextual menu "save image as"
In the save dialog change mozilla-banner.gif for mozilla-banner
Try to open the saved file in Photoshop.

This have something to do with the type / creator under MacOS I think, because
the default type/creator is set to Moz when the file is saved w/o extension
[TEXT/MOZZ]. If I add the extension or change the type for GIFf, Photoshop opens
the file as expected. 

Cc greg.

Greg, I think the file even w/o the right extension should get the right file
type under MacOS. Perhaps related to Bug 156191...

Comment 3

17 years ago
Confirmed using Mac/2002080208/9.2.2. Mozilla needs to be setting the Type code based on 
a reliable metadata chain. First, MIME type, if available. Second, original filename extension. 
Third, destination filename extension.

Mozilla seems to be completely ignoring the original MIME type of the image and setting the Type 
code based *exclusively* on the *destination* filename extension, and I can't imagine a more 
flawed logic for this operation.
Ever confirmed: true
QA Contact: sairuh → petersen

Comment 4

16 years ago
*** Bug 196899 has been marked as a duplicate of this bug. ***

Comment 5

16 years ago
Changing OS & adding qawanted (from the dupe)
Keywords: qawanted
OS: Mac System 9.x → MacOS X


12 years ago
Duplicate of this bug: 383005
Assignee: law → nobody
QA Contact: chrispetersen → file-handling
A user on SUMO reported another way to reproduce this in current (Firefox 7) builds on OS 10.6:
1. Click on a file download link, such as
2. In the File Save dialog, try to overwrite an existing file with the same type by clicking it in this dialog.
3. The file saves without a file extension, without overwriting the target file.
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:26.0) Gecko/20100101 Firefox/26.0

Works for me on latest Nightly (buildID: 20130821030213) and Firefox 24 beta 4 (buildID: 20130819170952).
Keywords: qawanted
Last Resolved: 5 years ago
Resolution: --- → WORKSFORME


2 years ago
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.