Hacker News new | past | comments | ask | show | jobs | submit login

Here's the closest I could come up with: https://codepen.io/dsmmcken/pen/rNRaOJE

It does a subtle blur, then a subtle sharpen, then repeats the middle pixel of a 3x3 grid. Happy holidays!

Doesn't work on mobile, probably needs some pixel scaling math.




I came across this SVG pixellate filter on Codepen, by Taylor Hunt, a while back. https://codepen.io/tigt/pen/aZYqrg - it works, but I'm not sure how it works. SVG filter code is just weird!


The filter first creates pattern of 2x2 black squares, spaced by 8 pixels vertically and horizontally.

Then it creates a composite of the original image and the just generated pattern, basically coloring the 2x2 squares with colors from the original image.

Finally it blows up the 2x2 squares to 10x10 squares using the feMorphology filter primitive with "dilate" type.

A very clever filter indeed.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: