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

Canvas images are displayed large #794

Open
K-Massy opened this issue Dec 4, 2023 · 2 comments
Open

Canvas images are displayed large #794

K-Massy opened this issue Dec 4, 2023 · 2 comments

Comments

@K-Massy
Copy link

K-Massy commented Dec 4, 2023

Thank you for helping.

I implemented the code with reference to the official documentation,

img_url = $('#imag_thumb').children('img').attr('src');  // get image url

var el = document.getElementById('img-crop');
var resize = new Croppie(el, {
	viewport: { width: 100, height: 100 },
	boundary: { width: 300, height: 300 },
	showZoomer: false,
	enableResize: true,
	enableOrientation: true,
	mouseWheelZoom: 'ctrl'
});
resize.bind({
	url: img_url,
});

The image size displayed on canvas is not adjusted like in the official demo, and is displayed at the same image size.

How can I adjust the image size like in the official demo?

@gabyokal
Copy link

gabyokal commented May 15, 2024

Hi!
Were you able to solve the problem?

@JorensM
Copy link

JorensM commented Jul 11, 2024

Make sure your page has <script/> tags for jQuery and croppie.js

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

3 participants