Giter VIP home page Giter VIP logo

Comments (4)

yagitoshiro avatar yagitoshiro commented on August 14, 2024

Carl, workaround is to divide the original width and height by multiples of 8 (8, 16, 24...).

var resizedImage = androidResizer.cameraImageAsResized(args.media, args.media.cropRect.width/16, args.media.cropRect.height/16, 0);

from imageasresized.

p0las avatar p0las commented on August 14, 2024

Hi.
There is no reason for workaround. You still have a bug in your module. Please read my bug report and android API carefully. The logic in your code has a flaw.
Basically you need to scale the image twice. Once on load when you create a bitmap. This can only scale by a power of 2 factor but it will save a lot of memory. This is the key to scale large images on android. Next you scale that smaller image using matrix to correct resolution requested by user. Scaling by a matrix has no restriction and you can create an image in any resolution.
I remember submitting a detailed bug report a while ago.

Pawel Olas

http://nopixels.net

On 07/08/2013, at 1:49 AM, yagi_ [email protected] wrote:

Carl, workaround is to divide the original width and height by multiples of 8 (8, 16, 24...).

var resizedImage = androidResizer.cameraImageAsResized(args.media, args.media.cropRect.width/16, args.media.cropRect.height/16, 0);

Reply to this email directly or view it on GitHub.

from imageasresized.

yagitoshiro avatar yagitoshiro commented on August 14, 2024

actually scaling image twice is what I was intended to do in this module. it does. and it's also worth noting that now four times it does. anyway it's true that there still remains something to do as you say.

from imageasresized.

yagitoshiro avatar yagitoshiro commented on August 14, 2024

Check out the latest commit:
3325d3c

from imageasresized.

Related Issues (10)

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.