Comments (4)
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.
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
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.
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.
Check out the latest commit:
3325d3c
from imageasresized.
Related Issues (10)
- Cant add module HOT 3
- License issue when using the module HOT 4
- Install failed HOT 11
- FileNotFoundException HOT 14
- Can not resize using "cameraImageAsResized" HOT 6
- floating point scale and crop bug HOT 3
- RuntimeException: Canvas: trying to use a recycled bitmap HOT 1
- Included in the newest SDK HOT 1
- License violation detected. Unlicensed module(s) detected HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from imageasresized.