Mobile app version of vmapp.org
Login or Join
Angela777

: If you download a picture and rename the picture to a different extension, does the file change? Let's say you downloaded a picture off the net as a GIF image (Image.gif), and renamed it to

@Angela777

Posted in: #FileFormat #Gif #Jpg

Let's say you downloaded a picture off the net as a GIF image (Image.gif), and renamed it to Image.jpg. Although it would change the file name, would the file be encoded as a jpg (i.e.: some of the image being thrown out due to it being a lossy format), or would the file remain the same as it was on the net (.png), with only the name being changed?

10.03% popularity Vote Up Vote Down


Login to follow query

More posts by @Angela777

3 Comments

Sorted by latest first Latest Oldest Best

 

@Berumen635

No. Changing the extension is a bit like changing the label on the soy sauce dispenser to say "Maple syrup". The results will not be useful and may be unpleasant.

FWIW, in some cases, when you open a file over the web in a browser, the browser may "sniff" the file and handle it correctly despite the misinformation handed it by the file extension. Some files have a detectable "signature" pattern of bytes at the beginning of the file.

But generally, changing the extension is asking for problems.

10% popularity Vote Up Vote Down


 

@Vandalay110

No

Neither OS X nor Windows will actually do anything for the image. They will just rename it to a different name. The operating system will be fooled though. This is trivially the case on Windows machine but OS X is a bit less naive in general. However in this case the net effect is the same.

This is easy to prove take a PNG image copy it rename it to same name but with a jpg extension. Ask file info, OS now reports the file is a JPEG file. But observe that the file size is exactly the same, that is a bit suspect. OK, so we can read the actual file if it starts with 089PNG as per standard then its a png file. So we can just take the header of the file and look at it. Lo and behold the file is in fact a PNG even if the extension is a jpg. Note: the terminal can not display the first character so it substitutes it with a question mark.



Image 1: Nothing changed in the files just by changing extension name. Still the operating system and the file info is fooled.

Case closed.

10% popularity Vote Up Vote Down


 

@Correia448

i use Mac OSX, and it asks when you change the extension if you really want to change the file type or not. i just tested it with a PNG file and renamed to a JPG. when i get the file info, it says it's an JPG file.

however, i recommend you use a image editing software such as Photoshop to do it properly and control the output to fit your needs.



edit: to clarify: i'm not saying it's exactly the same. i'm saying that OSX is fooled and says it's a JPG file. if you export the same original from Photoshop as JPG or PNG you get different settings, sizes, etc. it may do the trick for something he's trying to accomplish, even if it's not the correct way.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme