Giter VIP home page Giter VIP logo

Comments (5)

ArthurHub avatar ArthurHub commented on July 19, 2024

The requested width/height is an optimization to down-sample the cropped part to specific size, it may and probably will not be the exact size, see Loading Large Bitmaps Efficiently.

Also please be respectful of open source projects.

from android-image-cropper.

davidaik avatar davidaik commented on July 19, 2024

@ArthurHub Oh, I'm sorry, I didn't mean to sound disrespectful. I just wish to express my concern over the fact that to many, "reqWidth" might seem to mean "required width" and I think this could cause confusion when the resultant Bitmap isn't of the required width that might be expected. In my testing, I used reqWidth = 300 and reqHeight = 300 and the resultant Bitmap is sometimes ~300x300 and sometimes ~600x600 or ~400x400.

I think that this confusion would be similar to the one that getActualCropRect() might bring, in that what actually happens isn't what is expected.

Sorry again if I sounded rude.

from android-image-cropper.

davidaik avatar davidaik commented on July 19, 2024

@ArthurHub Should I make a PR after adding a getCroppedImageExactSize(int reqWidth, int reqHeight) method? Do you think such a method might be a useful addition?

from android-image-cropper.

ArthurHub avatar ArthurHub commented on July 19, 2024

I understand the naming issue, I have used those names because Android uses them in bitmap decoding options.
Obviously better documentation will help, but documentation is always an issue.

I don't think image resize is appropriate for the library, it counts as post processing that is beyond the scope of getting the cropped bitmap.
The only reason reqWidth/reqHeight is there is that it can be done during the bitmap decoding and is important for performance.

from android-image-cropper.

davidaik avatar davidaik commented on July 19, 2024

hmm I think you're right.

from android-image-cropper.

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.