renchap / shrine-blurhash Goto Github PK
View Code? Open in Web Editor NEWShrine plugin to compute Blurhash on image attachments
License: MIT License
Shrine plugin to compute Blurhash on image attachments
License: MIT License
Provide an option to test the mime-type of the attached file and avoid running blurhash if this is not an allowed mime-type.
Need to check how to do so, can we re-use existing shrine plugins, or directly their metadata? Should we detect metadata automatically?
Structure is already in place, and examples are here: Gargron/blurhash#7 (comment)
Those needs tests as well.
The various options and ways to use this plugin should be documented
Similar to what I did here: shrinerb/shrine#457
This makes it so the plugin adds the methods to compute the blurhash but does not run them automatically, allowing the user to do it themselves in their own add_metadata
block, or to run it conditionally.
Current tests are passing on my mac, but not in GH actions.
I guess this is because two different libvips versions are used, we should use the latest one in CI.
Currently we extract every pixels from the source image into an array, then compute blurhash based on it.
We should allow to resize the image before computing Blurhash to reduce memory allocations and get better performance.
Resize dimensions should be configurable and deactivable, but enabled by default.
Upload .jpg file and everything works fine.
We need to test for more cases:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.