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

img with srcset not working #65

Open pipeTM opened 9 years ago

pipeTM commented 9 years ago

Hi Kenneth,

great plugin! But when using images with srcset (with or without polyfills like picturefill or lazysizes/respimage) detection is not working correct. Also errors are thrown (IndexSizeError: Index or size is negative or greater than the allowed amount / context.drawImage image ...) when resizing images over 100% of their natural size.

Any ideas?

Thank you, Michael

psntr commented 7 years ago

Any news about that? Same issue wondered if you could find a solution @pipeTM .

pipeTM commented 7 years ago

@psntr sorry, no! I did'nt use this lib in that project.

jonaswannfors commented 4 years ago

Try this fix: https://github.com/kennethcachia/background-check/issues/116