You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Update phash.js - improve intToRGBA performance
Converted to bitwise operators to improve performance at high volumes.
* Update index.js - Improve performance of rgbaToInt
Converted math to bitwise operators to improve performance at high volumes.
* Update index.js - Improve performance of hasAlpha
Moved any repetitive mathematical operations outside the core loop and simplified accessors to allow for maximum JIT compile optimizations to take place.
* Update index.js - Improve performance of get/setPixelColor
Remove redundant calls to Math.round as it is called again within getPixelIndex in both cases.
* Update index.js - Fix high bit on color conversion can cause negative number
Added operation to ensure 32-bit color output is interpreted as a positive integer.
* Update index.js - Fix negative color value (again)
Final operation can "re-negate" the value - moved the conversion to unsigned int to be after alpha integration into the value.
* Update phash.js - fixed negatives the other way
Also issues with high-bit values going from int to RGBA - fixed.
* force build
---------
Co-authored-by: Andrew Lisowski <[email protected]>
0 commit comments