Giter Site home page Giter Site logo

Comments (16)

JimBobSquarePants avatar JimBobSquarePants commented on August 23, 2024 2

Yeah let’s re-add it. Was hoping to avoid it to preserve consistency with the CSS spec but with all those daft browser bugs we’ll need a backup plan.

from imagesharp.web.

brianpopow avatar brianpopow commented on August 23, 2024

@SigmundurMorkore can you provide the image in question?

from imagesharp.web.

SigmundurMorkore avatar SigmundurMorkore commented on August 23, 2024

Right sorry, was in a hurry when writing this issue up. Here you go @brianpopow :)

This is the JPG being formatted with: ?width=730&height=730&rmode=crop
20220131_095657
https://hk.cdn.fo/savn/txre1cva/20220131_095657.jpg?width=730&height=730&rmode=crop&s=7vf1XiXI9f3Z8qBWADtVEuJC6pg

And then this is the same JPG but being converted to WebP with: ?format=webp&width=730&height=730&rmode=crop
20220131_095657.webp.zip
https://hk.cdn.fo/savn/txre1cva/20220131_095657.jpg?format=webp&width=730&height=730&rmode=crop&s=3ceq5WFoMMC_SBmzd73zGAaPZcQ

from imagesharp.web.

SigmundurMorkore avatar SigmundurMorkore commented on August 23, 2024

Made a discovery! It seems Firefox and Chrome both fail to rotate the webp image. But Safari does manage to rotate the webp image correctly. Could this instead be a browser issue?

from imagesharp.web.

rosrosros avatar rosrosros commented on August 23, 2024

Is this somehow the same issue as here: #258 ?

from imagesharp.web.

SigmundurMorkore avatar SigmundurMorkore commented on August 23, 2024

We've tried replicating our issue with JPG, but have only been able to replicate the issue when the image format is WebP. So considering #258 has an issue with JPG, it would seem to be that these are different issues 🤷‍♂️

from imagesharp.web.

brianpopow avatar brianpopow commented on August 23, 2024

@SigmundurMorkore this really looks to me like a issue with the auto orient of the viewer (=browser). The Exif Information is preserved with both:

  • ?width=730&height=730&rmode=crop
  • ?format=webp&width=730&height=730&rmode=crop

The browsers I tested: chrome, opera, firefox seem to ignore exif with webp and with jpg they all rotate the image according to exif.

Not sure yet how #258 is related. I have not looked into that so far.

from imagesharp.web.

SigmundurMorkore avatar SigmundurMorkore commented on August 23, 2024

@brianpopow Yeah that would make sense... I wonder why I am unable to find anyone else having this issue with webp in browsers.

Is it possible to actually rotate the image and removing the orientation exif metadata with ImageSharp.Web?

from imagesharp.web.

SigmundurMorkore avatar SigmundurMorkore commented on August 23, 2024

This actually seems to also be an issue with PNG and AVIF: https://zpl.fi/exif-orientation-in-different-formats/

So it would seem to be ideal to be able to actually rotate the image (and removing the orientation metadata)

from imagesharp.web.

brianpopow avatar brianpopow commented on August 23, 2024

So it would seem to be ideal to be able to actually rotate the image (and removing the orientation metadata)

I think we dont have that yet in ImageSharp.Web, @JimBobSquarePants please correct me if I am wrong. Should we maybe add a AutoOrientProcessor?

from imagesharp.web.

SigmundurMorkore avatar SigmundurMorkore commented on August 23, 2024

The AutoOrientProcessor would be very handy! 👍

from imagesharp.web.

brianpopow avatar brianpopow commented on August 23, 2024

It seems we had AutoOrientProcessor at some point, but it was removed again: PR220

I think its worth reconsidering this, as I believe auto orient makes sense also without resizing.

from imagesharp.web.

SigmundurMorkore avatar SigmundurMorkore commented on August 23, 2024

We have added our own AutoOrientProcessor for now (following the code in #220), which solves our issue.

Agree it is worth reconsidering adding it to ImageSharp.Web officially.

Our working image with the AutoOrientProcessor 🥳
https://hk.cdn.fo/savn/txre1cva/20220131_095657.jpg?width=730&height=730&rmode=crop&autoorient=true&format=webp&s=n0S2Km4sa0v1D4oYowQaJmneC-8

from imagesharp.web.

dlemstra avatar dlemstra commented on August 23, 2024

The AutoOrientProcessor was removed because there was already an orient option in the ResizeWebProcessor that is enabled by default. Isn't this a bug instead the ResizeWebProcessor instead?

from imagesharp.web.

JimBobSquarePants avatar JimBobSquarePants commented on August 23, 2024

I wish it was a bug in our code.

It’s definitely a browser issue. We’re tracking the EXIF properties properly and orienting accordingly. Browsers are just super poor at implementing the CSS spec for the different image formats. That’s what happens when you cobble together a bunch of different libraries I guess…

from imagesharp.web.

JimBobSquarePants avatar JimBobSquarePants commented on August 23, 2024

Since we can't fix browser issues I would consider #260 to be an adequate workaround for now.

from imagesharp.web.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.