-
Notifications
You must be signed in to change notification settings - Fork 1
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
Image: Component part for image bundling / prerendered effects #41
Labels
enhancement
New feature or request
Comments
Work on it:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As a user of Modulo, I often want to do various image pre-processing, such as adjusting colors, cropping, or resizing large source images, and it would be convenient if that could be done at build time, even if I am using Modulo in the browser.
Or, for further customization, the canvas would be available:
We can also run this on render, so it can do non-static templating (requires mode="embed" so it won't discard the original)
This allows for tons of processing-style image manipulation.
Create a succinct image processing system that uses the ctx.filter property (see below) to load image.
<Image>
implementation:-media-src=
or-bin-src=
or-src64=
etc)mode="asset"
, then during build, exports as hashed png and deletedef
(default), otherwise if mode="embed", keep in base64 in JS (hope that gzip will make less wastefull!)mode="embed"
, allows for<img src="{{ my_image|cssfilter:'sepia(0.5)' }}" />
- e.g. live, template-rendering-time image filteringCould be done in <50 lines of code, and would be pretty useful and important.
https://stackoverflow.com/questions/30408939/how-to-save-image-from-canvas-with-css-filters
The text was updated successfully, but these errors were encountered: