# Perfect Pixel browser port Algorithm source: https://github.com/Mashiro0619/perfectPixel Pinned commit: 6e2de13e106cc07686120b19a4b32cee3832397f (NumPy backend, version 0.1.4). Original algorithm by theAmusing and contributors; fork fixes by Mashiro0619. The source package declares the MIT license in pyproject.toml. The upstream author credit is retained. The frozen Python reference under scripts/pixel-reference is for fixture maintenance only, never shipped to browsers. ## Browser-specific differences - Exact-length FFT via fft.js 4.0.4 (Fedor Indutny, MIT) and Bluestein for non-power-of-two axes. - Float32 intermediate calculations and ties-to-even rounding retain NumPy behavior where material to the grid. - Majority uses a fixed xorshift32 sampling stream (128 samples, six two-cluster iterations), not NumPy PCG64. Consequently mixed-cell colors may differ. No claim of pixel identity across backends. - RGBA extension: white-composited detection, alpha-only detection fallback, original RGBA sampling; median/majority operate on premultiplied color. Hidden colors at alpha zero are normalized to zero. - UI input/output size limits are additional browser safety limits; no resizing or cropping is implicit. ## MIT license Copyright (c) theAmusing and contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #### LICENSE This software is licensed under the MIT License. Copyright Fedor Indutny, 2017. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.