Skip to content
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

blob result image size not fit viewport size #331

Closed
fabien-michel opened this issue Jun 1, 2017 · 3 comments
Closed

blob result image size not fit viewport size #331

fabien-michel opened this issue Jun 1, 2017 · 3 comments

Comments

@fabien-michel
Copy link

With a viewport defined to 250x250.
The command result('blob', 'viewport') do not return an image resized to 250x250, but keep the image original scale (so dimensions can be larger or smaller)

var croppie = new Croppie(croppie_container, {
            viewport: { width: 250, height: 250, type: 'circle', },
            boundary: { width: 300, height: 300 },
        });
...
croppie.result('blob', 'viewport').then((blob) => {...});
@thedustinsmith
Copy link
Contributor

That's not the correct usage of the result method.
Try: croppie.result({type: 'blob', size: 'viewport'})...

@fabien-michel
Copy link
Author

Ok, thanks it's better, sorry for the noise.
Nevertheless, the doc indicate "viewport" as default size which not seems to be the case.

@thedustinsmith
Copy link
Contributor

Thanks for the heads up - it'll be taken care of in the next release:
#303

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants