Why does the file type not change when converting a .PDF to a .PNG?

226 views

I was watching a video where the narrator stated that changing a file type from .PDF to .PNG doesn’t change the actual file type of the document. Could anyone explain why ?

In: 2

10 Answers

Anonymous 0 Comments

The file extension is simply a name or label. If you rename a .pdf to a .png the actual contents of the file don’t change.

Most programs that work with files assume that the extension matches the file type. If a program for displaying.png files tries to open a PDF file named .png it probably won’t work. One could of course write a program to analyze a file and try to the file type based on the content.

Think of it like this: You have a jar of sand labeled “sand” and a jar of peanut butter labeled “pb”. The labels are like the file extensions. If you swap the labels you don’t change the contents of the jars, but you won’t get what you expect when you open them based on the label.

You are viewing 1 out of 10 answers, click here to view all answers.