the binary within the file tells the OS what application to use?
On modern operating systems it's typically the filename that clarifies what application to use. If you name a file foo.png then the OS will try to open it in an image viewer. If it's not a PNG, but actually an EXE, then the image viewer will go "hey, I don't see a PNG header in the first four bytes, this isn't a valid PNG."
View all comments
Show parent comment
1
u/nuclear_splines Ph.D Data Science Sep 23 '25
On modern operating systems it's typically the filename that clarifies what application to use. If you name a file
foo.pngthen the OS will try to open it in an image viewer. If it's not a PNG, but actually an EXE, then the image viewer will go "hey, I don't see a PNG header in the first four bytes, this isn't a valid PNG."