Giter VIP home page Giter VIP logo

Comments (4)

whackashoe avatar whackashoe commented on August 15, 2024

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.

Shuunen avatar Shuunen commented on August 15, 2024

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.

whackashoe avatar whackashoe commented on August 15, 2024

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.

Shuunen avatar Shuunen commented on August 15, 2024

sure :)

from antimoderate.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.