M
M
Mixa2021-11-30 18:53:29
JPEG
Mixa, 2021-11-30 18:53:29

Is there a difference between jpg, jpeg and png?

Downloading files through a Python script, graphic files, I accidentally discovered that if you incorrectly specify the format for the downloaded file to the script (for example, replace jpeg with jpg or png), then the file still remains working. In this case, the size of all variations remains the same. Hence the question: how is it done and is there really a difference?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Shumov, 2021-11-30
@inoise

The name of the file does not affect anything at all. The format is defined at the beginning of the file itself and serves as an instruction for interpreting the subsequent set of bytes. Of course, there is a fundamental difference between these formats.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question