kennethcachia / background-check

Automatically switch to a darker or a lighter version of an element depending on the brightness of images behind it.
http://kennethcachia.com/background-check/
MIT License
3.27k stars 282 forks source link

Error: Area too small but image is there #112

Open FloC3 opened 5 years ago

FloC3 commented 5 years ago

I have a slider with images. They are normal HTML and not background-image. But every image throws an error: Skipping image - XXXX - Area too small

the area settings are these: bottom: 409.46875 height: 0 imageHeight: -1 imageLeft: 0 imageTop: 199 imageWidth: 600 left: 37.375 right: 338.125 top: 309.46875 width: 300.75

it seems like the width could be calculated but not the height. Why? The image URL in the log message is correct. When I click it, I see my picture...

additional: the images in the slider are rendered smaller than their original size. But the BackgroundCheck takes the original size. This would lead to a wrong detection of the slider arrows I think. Do I have to tell the BackgroundCheck some settings, to take the correct image size? I could not check it because of the above error.