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

Can not preview the image. #9

Open
susheelbanyal opened this issue Dec 21, 2017 · 2 comments
Open

Can not preview the image. #9

susheelbanyal opened this issue Dec 21, 2017 · 2 comments

Comments

@susheelbanyal
Copy link

I Can not preview the image. its style is always 0 or none.
Can you please let me know how to show the preview and get the cropped image?
I go this in html for preview.
<img src="image_03.jpg" width="1024" height="576" style="display: block; width: 0px; height: 0px; min-width: 0px !important; min-height: 0px !important; max-width: none !important; max-height: none !important; transform: none;">

@MusicalEcho
Copy link

MusicalEcho commented Jan 25, 2018

I just get HTMLCanvasElement with getCropperCanvas method, and then convert it to DataURI that can be previewed in image tag. Looks like this:

let result: HTMLCanvasElement = this.angularCropper.cropper.getCroppedCanvas({
            aspectRatio: 1,
            width: 400,
            height: 400
        });
return result.toDataURL();

@vinayistar
Copy link

How to make responsive?? I want when I move the cropped area it should reflect instantly on preview. In example on top right side, that thing I want. How I can achieve that?

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