advanced-cropper / vue-advanced-cropper

The advanced vue cropper library that gives you opportunity to create your own croppers suited for any website design
https://advanced-cropper.github.io/vue-advanced-cropper/
Other
933 stars 130 forks source link

Feature Request: Fill image background with specific color #142

Closed kostaskoukouvis closed 3 years ago

kostaskoukouvis commented 3 years ago

Awesome tool! Would it be possible to add a prop to fill the cropped image background with a specific color?

Currently if you zoom out of the image and crop part of it the rest of the resulting image will be transparent. It would be nice if there was an option to fill that space with a color, probably with a prop sent to canvas?

Essentially that would require changing the updateCanvas function to do fillRect() before calling the drawImage() method. As far as I understood it is not possible to manually modify that method before calling getResults() right?

Norserium commented 3 years ago

@kostaskoukouvis, try to update to 1.7.0. I've added the support of fillColor field for the canvas property. The example.

kostaskoukouvis commented 3 years ago

Dude! You rock! Thanks a lot!

Norserium commented 3 years ago

@kostaskoukouvis, you are welcome!