Re: Proposal: Make it so when getting an image's dimensions, EXIF orientation is considered

2022-09-26 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
I’m +1 to making this change. Incorrect orientation is frustrating and this
is why browsers changed to always consider it (by default).

You're right that the web default is to consider EXIF orientation data,
controllable with the image-orientation CSS property:
https://developer.mozilla.org/en-US/docs/Web/CSS/image-orientation . (FYI,
link to MDN in future, it's a more neutral/universal source than Chrome
docs. MDN shows compat in all browsers, and Chrome implements a lot of
unique features).

On Sat, Sep 24, 2022 at 5:51 PM Adam Taylor  wrote:

> Following the advice of David Sanders and Mariusz Felisiak, I'm coming
> here with my proposal rather than continuing on with the ticket system (see 
> ticket
> #34035 ).
>
> I understand the reluctance to make this change. However, things change
> with web browsers and I believe web frameworks should make changes to stay
> in line with the web browsers. It used to be less common for web browsers
> to consider EXIF orientation, but now it's the standard. ImageField being
> able to save the image dimensions to another field is very useful but for
> my use case it's broken because it doesn't consider EXIF orientation so
> there are cases where the dimensions are the opposite of what they should
> be. I highly doubt I'm alone in this. Maybe there should be a setting that
> can be passed into ImageField to avoid breaking existing projects. I
> definitely think this should be part of Django rather than having the
> developers need to add this logic to each of their Django projects that
> need it.
>
> Thoughts?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-developers+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/c51cfad1-df74-446a-a341-53a007a9ae9fn%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAMyDDM1OXhAv%3DvNuha18Ssp0fJFWCfVgDxGK4gYLoKDH%3D5Nqcw%40mail.gmail.com.


Re: Proposal: Make it so when getting an image's dimensions, EXIF orientation is considered

2022-09-26 Thread David Sanders
Coincidence I was also just reading up image-orientation… I didn't realise
that it's the default behaviour now to orient.

I guess it's a question of whether/how to be backwards compatible?

On Mon, 26 Sept 2022 at 19:00, 'Adam Johnson' via Django developers
(Contributions to Django itself)  wrote:

> I’m +1 to making this change. Incorrect orientation is frustrating and
> this is why browsers changed to always consider it (by default).
>
> You're right that the web default is to consider EXIF orientation data,
> controllable with the image-orientation CSS property:
> https://developer.mozilla.org/en-US/docs/Web/CSS/image-orientation .
> (FYI, link to MDN in future, it's a more neutral/universal source than
> Chrome docs. MDN shows compat in all browsers, and Chrome implements a lot
> of unique features).
>
> On Sat, Sep 24, 2022 at 5:51 PM Adam Taylor  wrote:
>
>> Following the advice of David Sanders and Mariusz Felisiak, I'm coming
>> here with my proposal rather than continuing on with the ticket system (see 
>> ticket
>> #34035 ).
>>
>> I understand the reluctance to make this change. However, things change
>> with web browsers and I believe web frameworks should make changes to stay
>> in line with the web browsers. It used to be less common for web browsers
>> to consider EXIF orientation, but now it's the standard. ImageField
>> being able to save the image dimensions to another field is very useful but
>> for my use case it's broken because it doesn't consider EXIF orientation so
>> there are cases where the dimensions are the opposite of what they should
>> be. I highly doubt I'm alone in this. Maybe there should be a setting that
>> can be passed into ImageField to avoid breaking existing projects. I
>> definitely think this should be part of Django rather than having the
>> developers need to add this logic to each of their Django projects that
>> need it.
>>
>> Thoughts?
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django developers (Contributions to Django itself)" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-developers+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-developers/c51cfad1-df74-446a-a341-53a007a9ae9fn%40googlegroups.com
>> 
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-developers+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/CAMyDDM1OXhAv%3DvNuha18Ssp0fJFWCfVgDxGK4gYLoKDH%3D5Nqcw%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CADyZw-6ZxnXf-j%2B7mqnzc2TnzF00ohUO-FehhK9qxnA_7eWuXQ%40mail.gmail.com.


Re: Proposal: Make it so when getting an image's dimensions, EXIF orientation is considered

2022-09-26 Thread David Sanders
Actually might as well throw out one idea, feel free to discard:

Keep width and height as-is and add 2 additional properties for jpg:
`photo_width` and `photo_height` (or named something more suitable)

This way it stays inline with other image viewing/editing software which
still reports the width and height as is read from the image with the
rotation as separate meta-data. (Eg I did a cursory look with Gimp &
Preview on mac)

On Mon, 26 Sept 2022 at 19:20, David Sanders 
wrote:

> Coincidence I was also just reading up image-orientation… I didn't realise
> that it's the default behaviour now to orient.
>
> I guess it's a question of whether/how to be backwards compatible?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CADyZw-5mR87oKsDVnyLFwuftxY3As0%3Dz9JXydbSu2-Lvni-F7g%40mail.gmail.com.