Cropper: fillColor does not appear to fill up the background color of the image

Created on 11 Mar 2015  路  12Comments  路  Source: fengyuanchen/cropper

When I write the code as shown to grab the image and filling fillColor

image

The generated image does not appear to have the stated background. Instead, it shows a transparent background.

Most helpful comment

The fillColor is not showing up in my cropped image. I use v0.9 and strict-mode. When I rotate the image and get the cropped canvas the background is black. I use the following code:

$().cropper('getCroppedCanvas', { fillColor: '#FFFFFF' });

All 12 comments

I am sorry, the fillColor option had added to the src/js/methods.js file, but hasn't been released yet.

v0.9.0 had released.

The fillColor is not showing up in my cropped image. I use v0.9 and strict-mode. When I rotate the image and get the cropped canvas the background is black. I use the following code:

$().cropper('getCroppedCanvas', { fillColor: '#FFFFFF' });

@tilocgn It works.

@fengyuanchen Thanks a lot for the update to v0.9.1. Now besides the zoom and the the reset function, the fillColor work as well! All my problems are fixed :+1: Love it!

@fengyuanchen Is there any way to generate the image with brightness control. ? I am in the requirement of adding brightness control option to the image.
Please help.

@PavanMadala See #585.

Thank you so much for the reply fengyuanchen.

But, I am unable to use both the cropper and CamanJS together. Either one is working other one is not yet all working.
Please find the attached zip file contains my source code.
It would be very great full if you can apply the brightness here.

Thanks in advance.

-PavanMadala.

Hi yuanchen, if I'm working on a later version of cropperJS, can I still somehow change the fill color of an cropped image?

@jonathanleemc You can set fillColor in the getCroppedCanvas method. read the doc for more detail.

For me fillcolor property is not working. i am using 1.0.0 - rc version still getting black background after cropping.

@nirav-panchal As of v0.9.0, the getDataURL had been removed, please getCroppedCanvas instead.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nchase picture nchase  路  5Comments

ghengeveld picture ghengeveld  路  3Comments

steefaan picture steefaan  路  6Comments

rajjanorkar picture rajjanorkar  路  4Comments

JSteunou picture JSteunou  路  7Comments