Chronostasys / Blazor.Cropper

A blazor library provides component to crop image
MIT License
84 stars 19 forks source link

[QUESTION] Height and Width #61

Closed angelru closed 1 year ago

angelru commented 1 year ago

Hello, is there a way to adjust the width so that the gray does not appear? or get the height and width of the original image from cropper.

Chronostasys commented 1 year ago

Currently not. The image is auto adjusted to fit the container when the cropper init. You can get the original image's width and hight by jsinterop:

https://github.com/Chronostasys/Blazor.Cropper/blob/8f085332113ba889b0a1ab110739c7a76dd038d1/Blazor.Cropper/wwwroot/CropHelper.js#L62-L68

angelru commented 1 year ago

Thanks