Closed Bug 163458 Opened 22 years ago Closed 11 years ago

Corrupted image when saved w/o filename extension

Categories

(Core Graveyard :: File Handling, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: benjamin, Unassigned)

References

Details

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?
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 http://www.mozilla.org/ 
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...
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.
Status: UNCONFIRMED → NEW
Ever confirmed: true
QA Contact: sairuh → petersen
*** Bug 196899 has been marked as a duplicate of this bug. ***
Changing OS & adding qawanted (from the dupe)
Keywords: qawanted
OS: Mac System 9.x → MacOS X
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 https://zzxc.net/sumo/attach/test.jpg
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
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WORKSFORME
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.