GithubHelp home page GithubHelp logo

Comments (2)

lovell avatar lovell commented on May 28, 2024

Using the sample image from #4059 and the image from https://assets-tt-com.nmo.at/im-content/images/3b6073d7-d32f-53a2-8c09-544729a6d408, which are both 4032x3024 landscape images, I see exactly the same extract_area: bad extract area error when using both of the provided code samples you've provided.

This is the expected behaviour.

Both code samples take a 4032 wide x 3024 high landscape image as input, auto-orient it by rotating 90 degrees to create a 3024 wide x 4032 high portrait image, then correctly fail to extract an image with a width of 3583 pixels from an image of 3024 pixels wide.

from sharp.

setrol avatar setrol commented on May 28, 2024

oh, you are right, I was looking for the problem at the wrong point...
Just for context:
We are actually getting the extraction areas as percentages and need to do the area calculation ourselves. Therefore we first do a rotate(), then are fetching metadata() and do the calculation of the extract area regarding to the fetched metadata.
We did not take to account that the sharpStream.metadata() function still returns the original width and height with orientation set - we are trying to extract something that is not there..
Thank you for your input!

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.