GithubHelp home page GithubHelp logo

Comments (5)

lovell avatar lovell commented on May 27, 2024 1

Please see #2297 (comment)

from sharp.

Etheryte avatar Etheryte commented on May 27, 2024

Since Sharp uses libvips for image processing, I went ahead and tried it out natively as well. Running libvips from the command line, the issue is not present and orientation is handled correctly.

$ vips resize bugged-in.jpg out.jpg 0.1

So it seems like the issue stems from Sharp.

from sharp.

Etheryte avatar Etheryte commented on May 27, 2024

@lovell Thanks for the hint, that is a functional workaround for the problem. However, I would argue that this is fundamentally still a bug. If you think about it from a layman's perspective, when you open an image in paint and change its size, you wouldn't expect it to suddenly become rotated — likewise here. While I understand the technical rationale behind it, I think from an end user perspective it doesn't make sense as the default. Intuitively, rotating by zero degrees should be a no-op, it shouldn't be a prerequisite for resizing images.

That being said, I'm sure you have good reasons for the design choices and I'm just a random developer doing a drive-by on your library. Just my two cents for thought.

from sharp.

lovell avatar lovell commented on May 27, 2024

when you open an image in paint and change its size, you wouldn't expect it to suddenly become rotated

sharp is a library not a UI. It will not rotate images unless told to. The documented default behaviour is to remove EXIF metadata.

from sharp.

lovell avatar lovell commented on May 27, 2024

I hope this information helped. Please feel free to re-open with more details if further assistance is required.

from sharp.

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.