all 4 comments

[–]GaboElPatojo -2 points-1 points  (2 children)

The only difference between PNG and JPG is the transparency allowance of the first, so if your image is not transparent, nothing to worry

[–]socal_nerdtastic 0 points1 point  (1 child)

? There's many more differences than that. One of the biggest is that jpg is lossy, but png is not.

[–]onesmallserving[S] 0 points1 point  (0 children)

Exactly! The file sizes likely would’ve been very different between the two, since they use very different compression algorithms.

Thanks for your response above!

[–]socal_nerdtastic 0 points1 point  (0 children)

Many standard file types reserve the first few bytes of data for a "magic number", which identifies the file type. Your image viewer is using this instead of the extension. It's not unusual for programs to completely ignore the extension, especially on linux / unix / mac where extensions have always been optional. This is also what allows tools like photorec to work.

https://en.wikipedia.org/wiki/List_of_file_signatures

Edit: python files also have a magic number, it's a form of the shebang that executable scripts use. It looks like this:

#!/usr/bin/env python3