JaggedMetalOs t1_ixtyswp wrote
Reply to comment by donal23 in ELI5: In recent years, new formats like webp and jfif have started popping up. However, if I rename them to gif or jpeg, they still work. How can it be that renaming the extension doesn't ruin the image format? Why do they even exist then? by Luthemplaer
> Because that would mean that renaming an executable to an .jpg and having someone open it in said software, executes the file.
This couldn't happen, an exe file can't just run when loaded by a piece of software it would have to be explicitly interpreted as an executable program which Windows does to files named .exe but which some random image viewer wouldn't if you renamed it to jpeg.
Instead if would just check the file contents against the image formats it knows, and then give up when it doesn't find a match.
Viewing a single comment thread. View all comments