Answer the question
In order to leave comments, you need to log in
Python + django: how to correctly determine the dimensions of an image?
Good day to all! There is such a picture (the content of the picture is church, I beg your pardon, what it was.). And there is the following glitch: if you right-click on the picture in nautilus to find out the properties (I have ubuntu), then it will write that the dimensions are supposedly 4928 width and 3280 height. But if you open the picture and see the properties there, then everything is correct (4928 height and 3280 width). This is not an isolated case (I am making a website for a company that prints photos). The problem is that python detects the first (incorrect) dimensions and I don't know what to do about it. How the definition goes: this image is loaded into the standard field of the ImageField model, and when image.width and image.height are accessed, the wrong sizes are given. How can you get the right ones?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question