﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
37041	get_image_dimensions ignores exif roration	Johannes Maron		"Hi there!

While working on an unrelated update on django-pictures, I noticed that get_image_dimensions ignores the EXIF rotation of an image.

Now, is this intended or not? I could make an argument both ways. However, when you display an image in a browser (likely with Django) , browsers will rotate the image by default; see also: https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/image-orientation

So, if those values are used anywhere, like in the width/height attribute on an `img` tag (like it's happening in django-pictures). They will be “wrong.”

Now, the question is, should `get_image_dimensions` return the pixel dimension or the visual dimension of the image?

My advice: Let's do both and provide an explicit option. When using the function or the width/height fields, let's allow users to provide an option. We can keep the default as is and avoid a breaking change. Maybe deprecate the default in favor of an explicit user choice.

Cheers!
Joe"	Uncategorized	new	File uploads/storage	dev	Normal			Johannes Maron	Unreviewed	0	0	0	0	0	0
