Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve color operations performance #1263

Merged

Commits on Oct 27, 2023

  1. Update phash.js - improve intToRGBA performance

    Converted to bitwise operators to improve performance at high volumes.
    DLiblik committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    1893b72 View commit details
    Browse the repository at this point in the history
  2. Update index.js - Improve performance of rgbaToInt

    Converted math to bitwise operators to improve performance at high volumes.
    DLiblik committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    96f96e0 View commit details
    Browse the repository at this point in the history
  3. 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.
    DLiblik committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    c2386db View commit details
    Browse the repository at this point in the history
  4. Update index.js - Improve performance of get/setPixelColor

    Remove redundant calls to Math.round as it is called again within getPixelIndex in both cases.
    DLiblik committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    126876c View commit details
    Browse the repository at this point in the history
  5. 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.
    DLiblik committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    7fb6e6e View commit details
    Browse the repository at this point in the history
  6. 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.
    DLiblik committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    9b43f47 View commit details
    Browse the repository at this point in the history

Commits on Oct 29, 2023

  1. Update phash.js - fixed negatives the other way

    Also issues with high-bit values going from int to RGBA - fixed.
    DLiblik committed Oct 29, 2023
    Configuration menu
    Copy the full SHA
    1117d89 View commit details
    Browse the repository at this point in the history

Commits on Feb 23, 2024

  1. force build

    hipstersmoothie committed Feb 23, 2024
    Configuration menu
    Copy the full SHA
    2b1cde5 View commit details
    Browse the repository at this point in the history