{"_id":"k-centroid-scaler","_rev":"18-2c2089463f3f84b2e59be380ef9b7dd7","name":"k-centroid-scaler","dist-tags":{"latest":"1.4.0"},"versions":{"1.0.0":{"name":"k-centroid-scaler","version":"1.0.0","_id":"k-centroid-scaler@1.0.0","maintainers":[{"name":"pixagram","email":"omnibus@pixagram.io"}],"dist":{"shasum":"ce2e4c5b6eb24c1b7f3985577947ff7e8bd55d2f","tarball":"https://registry.npmjs.org/k-centroid-scaler/-/k-centroid-scaler-1.0.0.tgz","fileCount":4,"integrity":"sha512-vS9fZu8B1LlLA7KZoPVN+StMHFwqrKQm7yOog5wpDiP9NGY/fMavvIh8gCp8+gopsR4oa0EP+UX1kqv14gRDyQ==","signatures":[{"sig":"MEUCIHo3HmHvRKailN2xKzjMmmIND9UgfbYe/f5SbqSzT2CfAiEAiM01HzJEhMvyz7sSDKQ+3fNnRIBlvnb+HugLAMvD+x0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":40857},"main":"k_centroid_scaler.js","type":"module","_npmUser":{"name":"pixagram","email":"omnibus@pixagram.io"},"_npmVersion":"10.9.2","description":"A Rust/WebAssembly implementation of the K-Centroid image downscaling algorithm, converted from the original Lua/Aseprite script.","directories":{},"sideEffects":["./snippets/*"],"_nodeVersion":"22.14.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/k-centroid-scaler_1.0.0_1759197011842_0.6051748121402696","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"k-centroid-scaler","version":"1.1.0","_id":"k-centroid-scaler@1.1.0","maintainers":[{"name":"pixagram","email":"omnibus@pixagram.io"}],"dist":{"shasum":"fcfeb65ac42b1a283d47c9ea3939cf81056f8fc1","tarball":"https://registry.npmjs.org/k-centroid-scaler/-/k-centroid-scaler-1.1.0.tgz","fileCount":4,"integrity":"sha512-hqVJSVd5MkGEAgdluANyO9MhMaqRJ19FYu2689o77kEqe2euKF9NTHwNEpseTp4mJ8ihJ+Un/1GKtLQIp8JD3A==","signatures":[{"sig":"MEYCIQCjuhd6uHUHsBpzgk6FnD8FDZ7Q9Ewnb3dwLCwY7ioAZAIhAKVIqluIl7EHwnQWmYbuN9Phr6xU1uRjDVCCiS4Tt9Wr","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":74960},"main":"k_centroid_scaler.js","type":"module","_npmUser":{"name":"pixagram","email":"omnibus@pixagram.io"},"_npmVersion":"10.9.2","description":"A Rust/WebAssembly implementation of the K-Centroid image downscaling algorithm, converted from the original Lua/Aseprite script.","directories":{},"sideEffects":["./snippets/*"],"_nodeVersion":"22.14.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/k-centroid-scaler_1.1.0_1759198616570_0.426770876291535","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"k-centroid-scaler","version":"1.2.0","_id":"k-centroid-scaler@1.2.0","maintainers":[{"name":"pixagram","email":"omnibus@pixagram.io"}],"dist":{"shasum":"b50115fd9816f3205c7c546731f71d68856b4e83","tarball":"https://registry.npmjs.org/k-centroid-scaler/-/k-centroid-scaler-1.2.0.tgz","fileCount":4,"integrity":"sha512-jU9ZuAYxBNH6msM+m6jiIiNVSd8bND2KKMALW+ATvQ9Rd4hnhJ1rVJEJSj6swWXZljZcuCkRvfD72JTDN+mucQ==","signatures":[{"sig":"MEUCIAITZUAKIDNozp4YL/2YHvjXe81XOBOVqjQqeLOgTkg+AiEAzHLBgw2pHxF8FU1FgbFB3tSk8MoO8J61g5Xyipup4N8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":123503},"main":"k_centroid_scaler.js","type":"module","_npmUser":{"name":"pixagram","email":"omnibus@pixagram.io"},"_npmVersion":"10.9.2","description":"A Rust/WebAssembly implementation of the K-Centroid image downscaling algorithm and advanced color quantization tools, converted from the original Lua/Aseprite script.","directories":{},"sideEffects":["./snippets/*"],"_nodeVersion":"22.14.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/k-centroid-scaler_1.2.0_1759227913828_0.25170900155620046","host":"s3://npm-registry-packages-npm-production"}},"1.2.1":{"name":"k-centroid-scaler","version":"1.2.1","_id":"k-centroid-scaler@1.2.1","maintainers":[{"name":"pixagram","email":"omnibus@pixagram.io"}],"dist":{"shasum":"ad99621723f1068d79a7dff899bce4a79db541f1","tarball":"https://registry.npmjs.org/k-centroid-scaler/-/k-centroid-scaler-1.2.1.tgz","fileCount":5,"integrity":"sha512-PNlnVCB+2/urTLTDr8JBxo1laTcPb9l7ZzMQ41xVDZEGOQd9iV7AwF8h3XH8aHPW/NjlQ9IG3T4B7JICfILIFg==","signatures":[{"sig":"MEUCIEjSUqJT/Wcm0FkUfFz+qZAC7c8pJXokha6tb4IfXydAAiEAotMy01Z5S+zfgscpphfItfU06lmjCt8jlMgKFoEVxmk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":91837},"main":"k_centroid_scaler.js","type":"module","types":"k_centroid_scaler.d.ts","_npmUser":{"name":"pixagram","email":"omnibus@pixagram.io"},"_npmVersion":"10.9.2","description":"A Rust/WebAssembly implementation of the K-Centroid image downscaling algorithm and advanced color quantization tools, converted from the original Lua/Aseprite script.","directories":{},"sideEffects":["./snippets/*"],"_nodeVersion":"22.14.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/k-centroid-scaler_1.2.1_1761330147725_0.3548316149390591","host":"s3://npm-registry-packages-npm-production"}},"1.2.2":{"name":"k-centroid-scaler","version":"1.2.2","_id":"k-centroid-scaler@1.2.2","maintainers":[{"name":"pixagram","email":"omnibus@pixagram.io"}],"dist":{"shasum":"e61fac9831855da8220a6c12ec3483396386d2ed","tarball":"https://registry.npmjs.org/k-centroid-scaler/-/k-centroid-scaler-1.2.2.tgz","fileCount":4,"integrity":"sha512-/WRnQnLYKgVkSyvJMXH3r0MCPQLKJFNOIp+jP6Fw8BTVXZyHuHNANd2+LEYMvy8lManxehrC7TTZ9CLLc9FPSw==","signatures":[{"sig":"MEUCIA1ICDKMMPePEu9Ykl0kjtb8u+O9qPYKH+G5HypWoU0nAiEA1oGpREAfD/8IhanPOwHBfK7hUzy59Q2eZXh5nUfCYp8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":126105},"main":"k_centroid_scaler.js","type":"module","_npmUser":{"name":"pixagram","email":"omnibus@pixagram.io"},"_npmVersion":"10.9.2","description":"A Rust/WebAssembly implementation of the K-Centroid image downscaling algorithm and advanced color quantization tools, converted from the original Lua/Aseprite script.","directories":{},"sideEffects":["./snippets/*"],"_nodeVersion":"22.14.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/k-centroid-scaler_1.2.2_1761332458943_0.6554515081225365","host":"s3://npm-registry-packages-npm-production"}},"1.2.3":{"name":"k-centroid-scaler","version":"1.2.3","_id":"k-centroid-scaler@1.2.3","maintainers":[{"name":"pixagram","email":"omnibus@pixagram.io"}],"dist":{"shasum":"66e6aafe17f513562837f78aa573ea42d12273d6","tarball":"https://registry.npmjs.org/k-centroid-scaler/-/k-centroid-scaler-1.2.3.tgz","fileCount":5,"integrity":"sha512-ZmBBHlqi2TjpVVLZT0msUA0aQKixYbWDqSOz9Dw+qX8X5UYyHFvDZsVqfaUh6p5qSXd44qp2CNbK664XPnKVNw==","signatures":[{"sig":"MEYCIQD7h9xzMSqVWtKek9AqNufgFMQPokb3HMl746f1qMVsJQIhAPe99A6Duc/t4ilmXjklNKBIQNgcYcDjokrruPRluocN","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":132047},"main":"k_centroid_scaler.js","type":"module","types":"k_centroid_scaler.d.ts","_npmUser":{"name":"pixagram","email":"omnibus@pixagram.io"},"_npmVersion":"10.9.2","description":"A Rust/WebAssembly implementation of the K-Centroid image downscaling algorithm and advanced color quantization tools, converted from the original Lua/Aseprite script.","directories":{},"sideEffects":["./snippets/*"],"_nodeVersion":"22.14.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/k-centroid-scaler_1.2.3_1761462884936_0.8804229429170445","host":"s3://npm-registry-packages-npm-production"}},"1.2.4":{"name":"k-centroid-scaler","version":"1.2.4","_id":"k-centroid-scaler@1.2.4","maintainers":[{"name":"pixagram","email":"omnibus@pixagram.io"}],"dist":{"shasum":"04654cda5ba992a0bb29dd169c4f7e6d0d7e1af3","tarball":"https://registry.npmjs.org/k-centroid-scaler/-/k-centroid-scaler-1.2.4.tgz","fileCount":5,"integrity":"sha512-MinBcT1BVPajI6Wy2SamI+qBoiCcGW22sNWJWjti0IfPP/uRLG8nBcazMHUeHztByglatY8gh99nawBtUHYd5Q==","signatures":[{"sig":"MEUCIHh2/o/4UR40fvOMC3E7pbSALoBTP2nT02NTxMFT7p+RAiEA9YtT9o4tHXQc+JBiWjgWGCmJUxsRhwMplIYtLKDuFG4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":131067},"main":"k_centroid_scaler.js","type":"module","types":"k_centroid_scaler.d.ts","_npmUser":{"name":"pixagram","email":"omnibus@pixagram.io"},"_npmVersion":"10.9.2","description":"A Rust/WebAssembly implementation of the K-Centroid image downscaling algorithm and advanced color quantization tools, converted from the original Lua/Aseprite script.","directories":{},"sideEffects":["./snippets/*"],"_nodeVersion":"22.14.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/k-centroid-scaler_1.2.4_1761463651657_0.23681493841293744","host":"s3://npm-registry-packages-npm-production"}},"1.3.0":{"name":"k-centroid-scaler","version":"1.3.0","_id":"k-centroid-scaler@1.3.0","maintainers":[{"name":"pixagram","email":"omnibus@pixagram.io"}],"dist":{"shasum":"87f267bf783ad0c2dab506ecdabfab56dcb2a1c7","tarball":"https://registry.npmjs.org/k-centroid-scaler/-/k-centroid-scaler-1.3.0.tgz","fileCount":5,"integrity":"sha512-vlwPonENF/pBV1BYrBkQoqjjSVsH5j3pgpEEOcEAQUqDD7iEMVlImDA1Fc74Wn1JOCBuMaYCgh1Dq824lWT5jA==","signatures":[{"sig":"MEYCIQCAURTlKfmP0FU4XfWWuNjbVlk2PVPOw5FsXyCfuRS4/wIhAMg4atXogDTDOV5B7l7W7fzrn1RzRAgzZ0qZ6QWZiIOS","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":119622},"main":"k_centroid_scaler.js","type":"module","types":"k_centroid_scaler.d.ts","_npmUser":{"name":"pixagram","email":"omnibus@pixagram.io"},"_npmVersion":"10.9.2","description":"A Rust/WebAssembly implementation of the K-Centroid image downscaling algorithm and advanced color quantization tools, converted from the original Lua/Aseprite script.","directories":{},"sideEffects":["./snippets/*"],"_nodeVersion":"22.14.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/k-centroid-scaler_1.3.0_1763653554838_0.8359505865531018","host":"s3://npm-registry-packages-npm-production"}},"1.3.1":{"name":"k-centroid-scaler","version":"1.3.1","_id":"k-centroid-scaler@1.3.1","maintainers":[{"name":"pixagram","email":"omnibus@pixagram.io"}],"dist":{"shasum":"bb91db6e74cc4572d2c20d89518d49d4df126386","tarball":"https://registry.npmjs.org/k-centroid-scaler/-/k-centroid-scaler-1.3.1.tgz","fileCount":5,"integrity":"sha512-HuPC+CybS8vwFE/Nwk1hKGDR+a5WciM4hHPqw4fYSVmVcirWHKOClXADgoRDY9nkVec6SWZ/3HrPmo8/pnZQmQ==","signatures":[{"sig":"MEUCIQCLxgCefvvI7Hebpq/R4D/hnrhm0RRHqYLQ8Yj3MZVVjgIgC9bLi0PvNpJWbMEMULNIfilq/okqYM+j1iXWoSkQodE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":120173},"main":"k_centroid_scaler.js","type":"module","types":"k_centroid_scaler.d.ts","_npmUser":{"name":"pixagram","email":"omnibus@pixagram.io"},"_npmVersion":"10.9.2","description":"A Rust/WebAssembly implementation of the K-Centroid image downscaling algorithm and advanced color quantization tools, converted from the original Lua/Aseprite script.","directories":{},"sideEffects":["./snippets/*"],"_nodeVersion":"22.14.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/k-centroid-scaler_1.3.1_1763654070904_0.9762733314305438","host":"s3://npm-registry-packages-npm-production"}},"1.3.2":{"name":"k-centroid-scaler","version":"1.3.2","_id":"k-centroid-scaler@1.3.2","maintainers":[{"name":"pixagram","email":"omnibus@pixagram.io"}],"dist":{"shasum":"8c97f0a3df61200cf8116e26af6c14913b2de645","tarball":"https://registry.npmjs.org/k-centroid-scaler/-/k-centroid-scaler-1.3.2.tgz","fileCount":4,"integrity":"sha512-oHRcBpn/pJF+8NCwzkPCZ7+Ebt58KZ6K6bFt3hP8T50PApzt03qXtgALW3D1hUkUlNxPZsZMxL4EnfY6wtkWEQ==","signatures":[{"sig":"MEUCIQCN6JU2eiwtKupajTEJDPQV5oC0dGfugouwBz4XAez47wIgXqAKOv5zLuC5Ui2y6gZzDkbwnZJWLLFTJRXf7Aag1N0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":114670},"main":"k_centroid_scaler.js","type":"module","_npmUser":{"name":"pixagram","email":"omnibus@pixagram.io"},"_npmVersion":"10.9.2","description":"A Rust/WebAssembly implementation of the K-Centroid image downscaling algorithm and advanced color quantization tools, converted from the original Lua/Aseprite script.","directories":{},"sideEffects":["./snippets/*"],"_nodeVersion":"22.14.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/k-centroid-scaler_1.3.2_1763931828167_0.2861286920660018","host":"s3://npm-registry-packages-npm-production"}},"1.3.3":{"name":"k-centroid-scaler","version":"1.3.3","_id":"k-centroid-scaler@1.3.3","maintainers":[{"name":"pixagram","email":"omnibus@pixagram.io"}],"dist":{"shasum":"89a077107ffce2a258dfd23cf4c85cfadd497515","tarball":"https://registry.npmjs.org/k-centroid-scaler/-/k-centroid-scaler-1.3.3.tgz","fileCount":5,"integrity":"sha512-XUx1Ce23WN5ISndqusbVU1QIhwX3JaaFgylaDliHgnm51idZFH0fq4HNo5py93sQKnrlHWWmC0U5+6gz2LN7Rw==","signatures":[{"sig":"MEUCIQCtjSBmaWs2p2Y86tWkE+YexRTxIyzdGVegWrJl/g3qHgIgMJG4gnjPgIHYBayWABdHBqQY5i14IuJ9U08a3gBmciM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":120377},"main":"k_centroid_scaler.js","type":"module","types":"k_centroid_scaler.d.ts","_npmUser":{"name":"pixagram","email":"omnibus@pixagram.io"},"_npmVersion":"10.9.2","description":"A Rust/WebAssembly implementation of the K-Centroid image downscaling algorithm and advanced color quantization tools, converted from the original Lua/Aseprite script.","directories":{},"sideEffects":["./snippets/*"],"_nodeVersion":"22.14.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/k-centroid-scaler_1.3.3_1763932261166_0.24486583413342466","host":"s3://npm-registry-packages-npm-production"}},"1.3.4":{"name":"k-centroid-scaler","version":"1.3.4","_id":"k-centroid-scaler@1.3.4","maintainers":[{"name":"pixagram","email":"omnibus@pixagram.io"}],"dist":{"shasum":"313a89f96e70069b4c9db7229bd9dd096b98eb18","tarball":"https://registry.npmjs.org/k-centroid-scaler/-/k-centroid-scaler-1.3.4.tgz","fileCount":4,"integrity":"sha512-klrKMuA84b7xWT0Hn+8D1HuxH+oS7yesGvMYWzQ/F39rU3qC82V3cVk7T7oqfRctKMpQY00FaCJ2m7jIb4+/+Q==","signatures":[{"sig":"MEYCIQDaSzVrVtFbblQtI5KPcXe8SVaWY+8PONy8QKbkY76I9AIhAJA3wijtqrhXt1CxyvFNNSJ6PAJHhJy0W+9c33wPXuVK","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":117997},"main":"k_centroid_scaler.js","type":"module","_npmUser":{"name":"pixagram","email":"omnibus@pixagram.io"},"_npmVersion":"10.9.2","description":"A Rust/WebAssembly implementation of the K-Centroid image downscaling algorithm and advanced color quantization tools, converted from the original Lua/Aseprite script.","directories":{},"sideEffects":["./snippets/*"],"_nodeVersion":"22.14.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/k-centroid-scaler_1.3.4_1763939331881_0.4207108749470012","host":"s3://npm-registry-packages-npm-production"}},"1.3.5":{"name":"k-centroid-scaler","version":"1.3.5","_id":"k-centroid-scaler@1.3.5","maintainers":[{"name":"pixagram","email":"omnibus@pixagram.io"}],"dist":{"shasum":"c9cf201914299cb027f8de157c6894482d6a5d64","tarball":"https://registry.npmjs.org/k-centroid-scaler/-/k-centroid-scaler-1.3.5.tgz","fileCount":4,"integrity":"sha512-KLLe93ggtmHHCo7b0o5b4iBm75KtA8WpB5taWTW6wVNlVe1fkvcwcVFCEPp4ka4xdkEz/iXhwaaY/fXTbetNnA==","signatures":[{"sig":"MEQCID05GBFUi9ZGDVkh01p/9cTYjydmHAweTUzOv4aJtWxeAiAUlQBT4HYAZbHBmD6EJ44yp6Ic0vgDvpSHcJ2d3WKP8Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":117997},"main":"k_centroid_scaler.js","type":"module","_npmUser":{"name":"pixagram","email":"omnibus@pixagram.io"},"_npmVersion":"10.9.2","description":"A Rust/WebAssembly implementation of the K-Centroid image downscaling algorithm and advanced color quantization tools, converted from the original Lua/Aseprite script.","directories":{},"sideEffects":["./snippets/*"],"_nodeVersion":"22.14.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/k-centroid-scaler_1.3.5_1763939894198_0.6453201092099663","host":"s3://npm-registry-packages-npm-production"}},"1.3.6":{"name":"k-centroid-scaler","version":"1.3.6","_id":"k-centroid-scaler@1.3.6","maintainers":[{"name":"pixagram","email":"omnibus@pixagram.io"}],"dist":{"shasum":"c5ad0123ea6b7cc27d7a1a99ffd88efb4b0ac831","tarball":"https://registry.npmjs.org/k-centroid-scaler/-/k-centroid-scaler-1.3.6.tgz","fileCount":4,"integrity":"sha512-mpqt2RHU1daeQujTRQKk08Xy/cwUDR9P1Uxay0rs0fMOJoUjS5xlBr4fk0Owh6q9c7pO3TTydwTtgy9GX4wDCg==","signatures":[{"sig":"MEQCIGKTuyzZ/MWOMg5frWGROYxiV4TYTOAZtTfE8TNMKAJ+AiB3WY5W/Di+FZrCTwi8fukbntOOszwE2Y/YMJ+QpTO1NQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":118009},"main":"k_centroid_scaler.js","type":"module","_npmUser":{"name":"pixagram","email":"omnibus@pixagram.io"},"_npmVersion":"10.9.2","description":"A Rust/WebAssembly implementation of the K-Centroid image downscaling algorithm and advanced color quantization tools, converted from the original Lua/Aseprite script.","directories":{},"sideEffects":["./snippets/*"],"_nodeVersion":"22.14.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/k-centroid-scaler_1.3.6_1763940495615_0.5825782648994611","host":"s3://npm-registry-packages-npm-production"}},"1.3.7":{"name":"k-centroid-scaler","version":"1.3.7","_id":"k-centroid-scaler@1.3.7","maintainers":[{"name":"pixagram","email":"omnibus@pixagram.io"}],"dist":{"shasum":"ad292f03c3ee83d66c4fdb761e8e959dd2689a71","tarball":"https://registry.npmjs.org/k-centroid-scaler/-/k-centroid-scaler-1.3.7.tgz","fileCount":4,"integrity":"sha512-mKpdbzqaF0M4tYoT8PdMwsKSReO8Uy2yBEIiQgj5GE7ILvVpJ8tc4oV1QTqnOnqhRuQTkbNv/GpOyxxI5ufEmw==","signatures":[{"sig":"MEUCIQDC3zhvM3BW9Tob45AUIA70puocQu1rF4GnIEZ/t73ccQIgB+n3Dm8yQbp82m7Fj+LSdrMBHuCsjys0iL141R8WsAM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":116635},"main":"k_centroid_scaler.js","type":"module","_npmUser":{"name":"pixagram","email":"omnibus@pixagram.io"},"_npmVersion":"10.9.2","description":"A Rust/WebAssembly implementation of the K-Centroid image downscaling algorithm and advanced color quantization tools, converted from the original Lua/Aseprite script.","directories":{},"sideEffects":["./snippets/*"],"_nodeVersion":"22.14.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/k-centroid-scaler_1.3.7_1764064099223_0.5236530015620215","host":"s3://npm-registry-packages-npm-production"}},"1.3.8":{"name":"k-centroid-scaler","version":"1.3.8","_id":"k-centroid-scaler@1.3.8","maintainers":[{"name":"pixagram","email":"omnibus@pixagram.io"}],"dist":{"shasum":"fb1660dcad0bcf648ab4295df53041e96dea1b7a","tarball":"https://registry.npmjs.org/k-centroid-scaler/-/k-centroid-scaler-1.3.8.tgz","fileCount":4,"integrity":"sha512-UDg4jOddiHv8ZDbVt+XdBmtYt1bCqww6SIv5J8nwRpxvG5292rzWN6CkuLFhQ9lW9/KFqM3TJvY5oJeVdXLyiA==","signatures":[{"sig":"MEUCIGZJWY9irmSX/nV7cbCoh5NdSrBw3LYJxdO806/DS+sJAiEA2fmoTZddat3OCkPIs/VmvrEkWdfncGkfiuhekBaQy2Y=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":104888},"main":"k_centroid_scaler.js","type":"module","_npmUser":{"name":"pixagram","email":"omnibus@pixagram.io"},"_npmVersion":"10.9.2","description":"A Rust/WebAssembly implementation of the K-Centroid image downscaling algorithm and advanced color quantization tools, converted from the original Lua/Aseprite script.","directories":{},"sideEffects":["./snippets/*"],"_nodeVersion":"22.14.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/k-centroid-scaler_1.3.8_1764791798956_0.2049645501556443","host":"s3://npm-registry-packages-npm-production"}},"1.3.9":{"name":"k-centroid-scaler","version":"1.3.9","_id":"k-centroid-scaler@1.3.9","maintainers":[{"name":"pixagram","email":"omnibus@pixagram.io"}],"dist":{"shasum":"84e861bb58c66d58cef2bedb80044f8a299c859a","tarball":"https://registry.npmjs.org/k-centroid-scaler/-/k-centroid-scaler-1.3.9.tgz","fileCount":4,"integrity":"sha512-KeU7A1WsRfAQvjSf+xTUr5WPY8HXq6YMUolxqQQKrPV3TmBto2vqU06s8n7skjoe0UAnHgkmCMYmBRqaQNsQzg==","signatures":[{"sig":"MEQCIAuEF75XUn3fkBA/2AbdGjPhZ5Drj94w+Ih+ulZwC+F5AiAwvE+jTMX46NGNS3LzbXTxfR+Gxi7eo3wBsIbhBNGdng==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":110212},"main":"k_centroid_scaler.js","type":"module","_npmUser":{"name":"pixagram","email":"omnibus@pixagram.io"},"_npmVersion":"10.9.2","description":"A Rust/WebAssembly implementation of the K-Centroid image downscaling algorithm and advanced color quantization tools, converted from the original Lua/Aseprite script.","directories":{},"sideEffects":["./snippets/*"],"_nodeVersion":"22.14.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/k-centroid-scaler_1.3.9_1764792297179_0.6134025493973165","host":"s3://npm-registry-packages-npm-production"}},"1.4.0":{"name":"k-centroid-scaler","type":"module","version":"1.4.0","main":"k_centroid_scaler.js","sideEffects":["./snippets/*"],"_id":"k-centroid-scaler@1.4.0","description":"A Rust/WebAssembly implementation of the K-Centroid image downscaling algorithm and advanced color quantization tools, converted from the original Lua/Aseprite script.","_nodeVersion":"22.14.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-Mr3UMwBBv1N/qI/KIVQvZxDg6rNLVqRU3vA875sPYTa/mXp2lwNJ2j+rs03qOxZB4X4MAqH0K/6oVkQRXVTdpA==","shasum":"e3ed6e34b9db5aa3823fb850e1da2182a770f6a7","tarball":"https://registry.npmjs.org/k-centroid-scaler/-/k-centroid-scaler-1.4.0.tgz","fileCount":4,"unpackedSize":107314,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCaebfBXFIeNYbzZEdX2JK/8BVZM1QF0LcuCCEHUS3BSwIhAMLwMcG8VgX5k6gNFocMRN9hS63177FeVWQn4w5vWq3X"}]},"_npmUser":{"name":"pixagram","email":"omnibus@pixagram.io"},"directories":{},"maintainers":[{"name":"pixagram","email":"omnibus@pixagram.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/k-centroid-scaler_1.4.0_1766958145781_0.6183865243231013"},"_hasShrinkwrap":false}},"time":{"created":"2025-09-30T01:50:11.731Z","modified":"2025-12-28T21:42:26.162Z","1.0.0":"2025-09-30T01:50:12.032Z","1.1.0":"2025-09-30T02:16:56.762Z","1.2.0":"2025-09-30T10:25:14.009Z","1.2.1":"2025-10-24T18:22:27.919Z","1.2.2":"2025-10-24T19:00:59.143Z","1.2.3":"2025-10-26T07:14:45.133Z","1.2.4":"2025-10-26T07:27:31.864Z","1.3.0":"2025-11-20T15:45:55.034Z","1.3.1":"2025-11-20T15:54:31.084Z","1.3.2":"2025-11-23T21:03:48.356Z","1.3.3":"2025-11-23T21:11:01.349Z","1.3.4":"2025-11-23T23:08:52.079Z","1.3.5":"2025-11-23T23:18:14.405Z","1.3.6":"2025-11-23T23:28:15.799Z","1.3.7":"2025-11-25T09:48:19.412Z","1.3.8":"2025-12-03T19:56:39.134Z","1.3.9":"2025-12-03T20:04:57.427Z","1.4.0":"2025-12-28T21:42:25.929Z"},"description":"A Rust/WebAssembly implementation of the K-Centroid image downscaling algorithm and advanced color quantization tools, converted from the original Lua/Aseprite script.","maintainers":[{"name":"pixagram","email":"omnibus@pixagram.io"}],"readme":"# K-Centroid Image Scaler & Color Quantizer - WebAssembly Module\n\nA Rust/WebAssembly implementation of the K-Centroid image downscaling algorithm and advanced color quantization tools, converted from the original Lua/Aseprite script.\n\n## Features\n\n### 1. K-Centroid Image Scaling\nIntelligent downscaling using K-means clustering on image tiles to preserve important colors.\n\n### 2. Color Quantization\nTwo high-quality algorithms for reducing color palettes:\n- **Median Cut**: Best quality, ideal for photographs and complex images\n- **K-Means**: Faster processing, great for graphics and illustrations\n\n### 3. Color Analysis with Spatial Sorting\nAdvanced color analysis with multiple sorting algorithms:\n- **Z-Order (Morton)**: Groups similar colors using space-filling curves\n- **Hilbert Curve**: Superior locality preservation for color relationships\n- **Hue-based**: Sort by color wheel position\n- **Luminance**: Sort by brightness\n- **Frequency**: Sort by usage percentage\n\n### 4. Dominant Color Extraction\nAutomatically identifies and quantizes dominant colors with configurable minimum coverage thresholds.\n\n### 5. Palette Extraction\nExtract dominant colors from any image for analysis or design purposes.\n\n## Algorithm Overview\n\n### K-Centroid Scaling\n1. **Tile Division**: The image is divided into tiles based on the target dimensions\n2. **K-Means Clustering**: Each tile undergoes K-means clustering to identify dominant colors\n3. **Color Selection**: The most dominant color (centroid with most pixels) represents each tile\n4. **Downscaling**: Each pixel in the output image uses the dominant color from its corresponding tile\n\n### Color Quantization\n- **Median Cut**: Recursively divides the color space to find optimal palette\n- **K-Means**: Clusters similar colors together for palette reduction\n- **Floyd-Steinberg Dithering**: Optional error diffusion for smoother gradients\n\n## Module Interface\n\n### K-Centroid Resize\n```rust\nk_centroid_resize(\n    image_data: &[u8],      // RGBA image buffer\n    original_width: u32,    // Source image width\n    original_height: u32,   // Source image height\n    target_width: u32,      // Desired output width\n    target_height: u32,     // Desired output height\n    centroids: u32,         // Number of color centroids (2-16 recommended)\n    iterations: u32,        // K-means iterations (1-20 recommended)\n) -> ImageResult\n```\n\n### Color Quantization (Median Cut)\n```rust\nquantize_colors_median_cut(\n    image_data: &[u8],      // RGBA image buffer\n    width: u32,             // Image width\n    height: u32,            // Image height\n    num_colors: u32,        // Target color count (2-256)\n    dithering: bool,        // Apply Floyd-Steinberg dithering\n) -> ImageResult\n```\n\n### Color Quantization (K-Means)\n```rust\nquantize_colors_kmeans(\n    image_data: &[u8],      // RGBA image buffer\n    width: u32,             // Image width\n    height: u32,            // Image height\n    num_colors: u32,        // Target color count (2-256)\n    iterations: u32,        // K-means iterations\n    dithering: bool,        // Apply Floyd-Steinberg dithering\n) -> ImageResult\n```\n\n### Palette Extraction\n```rust\nextract_palette(\n    image_data: &[u8],      // RGBA image buffer\n    max_colors: u32,        // Maximum colors to extract\n) -> ColorPalette\n```\n\n### Color Analysis with Sorting\n```rust\nanalyze_colors(\n    image_data: &[u8],      // RGBA image buffer\n    max_colors: u32,        // Maximum colors to return (capped at 256)\n    sort_method: &str,      // Sorting algorithm\n) -> ColorAnalysis\n```\n\n**Sort Methods:**\n- `\"z-order\"` or `\"morton\"`: Space-filling curve for color grouping\n- `\"hilbert\"`: Hilbert curve for better locality preservation\n- `\"hue\"`: Sort by hue value (color wheel position)\n- `\"luminance\"` or `\"brightness\"`: Sort by perceived brightness\n- `\"frequency\"`: Sort by usage percentage (most to least common)\n\n**Return Structure:**\n```javascript\n{\n    colors: [{\n        hex: string,        // \"#RRGGBB\" format\n        percentage: number, // % of image (0-100)\n        count: number,      // Pixel count\n        r: number,          // Red (0-255)\n        g: number,          // Green (0-255)\n        b: number           // Blue (0-255)\n    }],\n    totalColors: number,    // Unique colors found\n    totalPixels: number     // Pixels analyzed\n}\n```\n\n### Dominant Colors with Auto-Quantization\n```rust\nget_dominant_colors(\n    image_data: &[u8],      // RGBA image buffer\n    num_colors: u32,        // Target dominant colors\n    min_coverage: f32,      // Minimum % coverage threshold\n) -> ColorAnalysis\n```\n\n## Usage Examples\n\n### Basic Color Quantization\n```javascript\nimport init, { quantize_colors_median_cut } from './pkg/k_centroid_scaler.js';\n\nasync function reduceColors() {\n    await init();\n    \n    // Get image data\n    const canvas = document.getElementById('canvas');\n    const ctx = canvas.getContext('2d');\n    const imageData = ctx.getImageData(0, 0, canvas.width, canvas.height);\n    \n    // Reduce to 16 colors with dithering\n    const result = quantize_colors_median_cut(\n        imageData.data,\n        canvas.width,\n        canvas.height,\n        16,     // 16 colors\n        true    // Enable dithering\n    );\n    \n    // Display result\n    const outputImageData = new ImageData(\n        new Uint8ClampedArray(result.data),\n        result.width,\n        result.height\n    );\n    ctx.putImageData(outputImageData, 0, 0);\n}\n```\n\n### Complete Processing Pipeline\n```javascript\nasync function processImage(imageData, width, height) {\n    // Step 1: Downscale\n    const scaled = await downscaleImage(\n        imageData, width, height,\n        width / 2, height / 2,\n        { centroids: 4, iterations: 5 }\n    );\n    \n    // Step 2: Quantize colors\n    const quantized = await quantizeColorsMedianCut(\n        scaled.data,\n        scaled.width,\n        scaled.height,\n        { numColors: 8, dithering: true }\n    );\n    \n    return quantized;\n}\n```\n\n### Extract Color Palette\n```javascript\nasync function getPalette(imageData) {\n    const palette = await extractColorPalette(imageData, 16);\n    console.log(`Found ${palette.count} colors:`, palette.colors);\n    // Returns array of {r, g, b} objects\n}\n```\n\n### Analyze Colors with Z-Order Sorting\n```javascript\nasync function analyzeColors(imageData) {\n    const { analyze_colors } = await init();\n    \n    // Get up to 256 colors sorted by Z-order (groups similar colors)\n    const analysis = analyze_colors(imageData, 256, 'z-order');\n    \n    // Access color information\n    analysis.colors.forEach(color => {\n        console.log(`${color.hex}: ${color.percentage.toFixed(2)}% (${color.count} pixels)`);\n    });\n    \n    // Generate CSS variables\n    const cssVars = analysis.colors\n        .slice(0, 10)  // Top 10 colors\n        .map((c, i) => `--color-${i+1}: ${c.hex};`)\n        .join('\\n');\n}\n```\n\n### Get Dominant Colors\n```javascript\nasync function getDominantPalette(imageData) {\n    const { get_dominant_colors } = await init();\n    \n    // Get 16 dominant colors, ignoring colors below 0.1% coverage\n    const dominant = get_dominant_colors(imageData, 16, 0.1);\n    \n    // Create HTML palette display\n    const paletteHTML = dominant.colors\n        .map(c => `\n            <div style=\"display: inline-block;\">\n                <div style=\"width: 50px; height: 50px; background: ${c.hex};\"></div>\n                <small>${c.percentage.toFixed(1)}%</small>\n            </div>\n        `)\n        .join('');\n}\n```\n\n### Export Color Analysis Results\n```javascript\n// Export as JSON\nconst colorData = {\n    palette: analysis.colors.map(c => ({\n        hex: c.hex,\n        rgb: [c.r, c.g, c.b],\n        usage: c.percentage\n    }))\n};\n\n// Export as CSS custom properties\nconst css = `:root {\n${analysis.colors.slice(0, 20).map((c, i) => \n    `  --palette-${i}: ${c.hex}; /* ${c.percentage.toFixed(1)}% */`\n).join('\\n')}\n}`;\n\n// Export as SCSS/Sass variables\nconst scss = analysis.colors.slice(0, 20)\n    .map((c, i) => `$color-${i}: ${c.hex};`)\n    .join('\\n');\n```\n\n## Parameter Guidelines\n\n### Quantization Method Selection\n- **Median Cut**: Use for photographs, natural images, gradients\n- **K-Means**: Use for graphics, logos, illustrations with flat colors\n\n### `num_colors` (2-256)\n- **2-4**: Extreme stylization, poster effect\n- **8-16**: Retro gaming aesthetic\n- **32-64**: Good balance of quality and compression\n- **128-256**: Near-original quality with reduced file size\n\n### `dithering` (true/false)\n- **Enable**: For smooth gradients and photographs\n- **Disable**: For pixel art or when crisp edges are needed\n\n### `iterations` (K-Means only, 1-50)\n- **5-10**: Fast processing, good results\n- **20-30**: Better color accuracy\n- **40-50**: Maximum quality, slower processing\n\n## Performance Optimizations\n\n### Algorithm Complexity\n- **Median Cut**: O(n log n) where n = unique colors\n- **K-Means**: O(n × k × i) where n = pixels, k = colors, i = iterations\n- **Dithering**: O(w × h) single pass through image\n\n### WebAssembly Optimizations\n- K-means++ initialization for better convergence\n- Weighted color averaging based on pixel frequency\n- Efficient color distance calculations\n- Floyd-Steinberg dithering with minimal memory overhead\n\n## Build Instructions\n\n### Prerequisites\n- Rust toolchain (`curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh`)\n- wasm-pack (`curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh`)\n\n### Building\n```bash\nchmod +x build.sh\n./build.sh\n```\n\n## Comparison: Quantization Methods\n\n| Method | Best For | Speed | Quality | Dithering Support |\n|--------|----------|-------|---------|-------------------|\n| Median Cut | Photos, gradients | Medium | Excellent | Yes |\n| K-Means | Graphics, logos | Fast | Very Good | Yes |\n| K-Centroid Resize | Downscaling | Fast | Good | No |\n\n## Advanced Features\n\n### Custom Initialization\nThe K-means algorithm uses K-means++ initialization for optimal starting centroids, ensuring better convergence and more consistent results.\n\n### Weighted Clustering\nColors are weighted by their frequency in the image, ensuring common colors are better represented in the final palette.\n\n### Error Diffusion\nFloyd-Steinberg dithering distributes quantization errors to neighboring pixels, creating smoother gradients with limited colors.\n\n## License\nConverted to Rust/WebAssembly for web usage. Original K-Centroid algorithm from Aseprite Lua script.\n","readmeFilename":"README.md"}