Coder Social home page Coder Social logo

Comments (9)

tobimori avatar tobimori commented on June 15, 2024 2

You can customize the blur by adjusting the stdDeviation in https://github.com/johannschopplich/kirby-blurry-placeholder/blob/main/BlurryPlaceholder.php#L54

from kirby-blurry-placeholder.

johannschopplich avatar johannschopplich commented on June 15, 2024 1

Hello there!

You can try to improve the pixel target to generate bigger thumbnails (although not recommended), which are embedded into the blurry SVG placeholder. The implementation mocks the one from Google's former AMP project. I'm not sure what you expected. In my opinion, your placeholders are smooth. Every image is different. So yeah, maybe it's the color contrast.

Regarding transparent images, there is the transparent option for both $file->placeholder() and $file->placeholderUri() field methods. It will omit the artifacts of transparent images.

There is also a different implementation for blurry images using the blurhash algorithm by @tobimori which you might prefer, since more details is preserved. You can check it out as well: kirby-blurhash

from kirby-blurry-placeholder.

johannschopplich avatar johannschopplich commented on June 15, 2024 1

Absolutely! The younger generation builds upon what the older one has created and teaches a lesson or two. Circle of life. 🙃

The Gaussian blur parameter could be a plugin option. 👀

from kirby-blurry-placeholder.

CHE1RON avatar CHE1RON commented on June 15, 2024

// Edit:

For PNG files with transparency, I get this:

Screenshot 2023-03-26 at 09 04 44

from kirby-blurry-placeholder.

johannschopplich avatar johannschopplich commented on June 15, 2024

@tobimori Great input! 👏

from kirby-blurry-placeholder.

CHE1RON avatar CHE1RON commented on June 15, 2024

Thanks you guys! Seems even @johannschopplich learned something 😅 (just kidding)

from kirby-blurry-placeholder.

CHE1RON avatar CHE1RON commented on June 15, 2024

Not sure about who's the younger generation here 🤣

That's what I ended up with (note the blur in the beginning, the bw-color effect applies to all images, see the end of the clip, when scrolling up again)

lazy_480.mov

from kirby-blurry-placeholder.

CHE1RON avatar CHE1RON commented on June 15, 2024

The filesize savings are quite decent, and in accordance with the bw effect, with placeholders being generated as bw, this shaves some additional kb 😉

from kirby-blurry-placeholder.

CHE1RON avatar CHE1RON commented on June 15, 2024

Absolutely! The younger generation builds upon what the older one has created and teaches a lesson or two. Circle of life. 🙃

The Gaussian blur parameter could be a plugin option. 👀

TOTALLY!

from kirby-blurry-placeholder.

Related Issues (20)

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.