Comments (4)
The jpg one is the one that exists as initial data.
Line 248 in antimoderate.js
idata_img.src = idata;
It just is setting the input base64 to an Image var.
That is the first request, the second is on line 245 in antimoderate.js
img.src = canvas.toDataURL();
This converts the canvas we drew on to data:image/png, and it shows up in network because we set the src attribute to it. (This is where blurred version is set to img)
Thanks glad you like it :)
from antimoderate.
Thanks for the explanation :)
Now I wonder if I could implement some mechanics server side on nodejs, like you want profile.jpg ? here is a tiny version of 1kb and then client side request for profile.jpg?size=large on document ready and use the async blurry to sharp image loading.
In this case the server would do the re-sizing job once and then serve this version until we ask him the same picture with size parameter.
In the DOM it will be simply :
<img src="profile.jpg" class="blurry-async">
from antimoderate.
Np. Yes an automatic system like that would be quite cool! Lemme know if
you decide to implement it, would love to check it out.
On Mon, Nov 30, 2015 at 2:08 AM, Romain Racamier [email protected]
wrote:
Thanks for the explanation :)
Now I wonder if I could implement some mechanics server side on nodejs,
like you want profile.jpg ? here is a tiny version of 1kb and then client
side request for profile.jpg?size=large on document ready and use the async
blurry to sharp image loading.In this case the server would do the re-sizing job once and then serve
this version until we ask him the same picture with size parameter.In the DOM it will be simply :
![]()
—
Reply to this email directly or view it on GitHub
#4 (comment)
.
from antimoderate.
sure :)
from antimoderate.
Related Issues (15)
- Errors in example
- support HOT 1
- support (plugin) HOT 7
- Expected behavior happening in reverse. HOT 10
- Publish demo on github pages
- Info about the license unclear HOT 1
- Support
- Is this just for <img/>?
- Large image loads, small image(very briefly), then large image again
- Support background-image HOT 7
- Browser Compatibility HOT 3
- better readme / usage guide HOT 3
- Add bower integration HOT 1
- img srcset support (question) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from antimoderate.