Skip to content

Image custom size is not working #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ignaciolarranaga opened this issue Oct 19, 2016 · 1 comment
Closed

Image custom size is not working #7

ignaciolarranaga opened this issue Oct 19, 2016 · 1 comment
Labels

Comments

@ignaciolarranaga
Copy link

ignaciolarranaga commented Oct 19, 2016

I changed the code of the CameraTest in this way:

export function onTakePictureTap(args: EventData) {
    let page = <Page>(<View>args.object).page;
    let saveToGallery = page.bindingContext.get("saveToGallery");
    takePicture({width: 180, height: 180, keepAspectRatio: false, saveToGallery: saveToGallery}).
        then((imageAsset) => {
            let source = new ImageSource();
            source.fromAsset(imageAsset).then(source => {
                console.log("Size: " + source.width + "x" + source.height);
            });
            page.bindingContext.set("cameraImage", imageAsset);
        }, 
        (err) => {
            console.log("Error -> " + err.message);
        });
}

which should produce an square image, but says: CONSOLE LOG file:///app/main-page.js:25:24: Size: 375x667

and here is how it looks:

simulator screen shot oct 19 2016 10 41 03

@tsonevn
Copy link
Contributor

tsonevn commented Feb 16, 2017

duplicated with #26

@tsonevn tsonevn closed this as completed Feb 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants