Open clelland opened 1 year ago
Open question - should the threshold be left as implementation-defined? This calculation could be effectively skipped by setting it to 0, if an implementor wanted to ignore entropy.
Ian, is there anything prevent this from landing? I think we can start with 0.05 for now to make sure all implementations have the same value. If we want to allow implementations to ignore entropy, maybe we can specify this feature is optional rather than making entropy itself to be implementation-defined.
@clelland
I think that question was the only reason I hadn't landed it yet. I can add a word or two to make the step optional if the implementation doesn't want to consider entropy (if you think that's useful -- or else we can just make it part of the definition)
Maybe just part of the definition I think?
@clelland Ian, do you have data about how often an low entropy image is detected? Or how useful is this? Or any data related to how the threshold was picked? Thanks!
This adds a simple calculation of image entropy, defined as the number of bytes in the image resource, divided by the rendered size of the image. If an image fails to meet the entropy threshold, then it is excluded as an LCP candidate image.
Closes: #72, #86
Preview | Diff