Show HN: PlutoFilter- A single-header, zero-allocation image filter library in C

github.com

76 points by sammycage 5 days ago


jlundberg - 8 hours ago

Well done and great with all the examples. Kind of wish I had a use case for this already, but I probably have :)

anitil - a day ago

I was wondering how it would do arbitrary-sized kernels without dynamic allocation (my guess was that it would use the input/output buffer as a temporary storage). The answer is that there's a _slight_ asterix to the 'zero-allocation' - the allocation is on the stack [0], but it's small-ish (2kb) and fixed size. So in an embedded context you'd just want to make sure you have headroom for this.

[0] https://github.com/sammycage/plutofilter/blob/main/plutofilt...

mnaimd - a day ago

Wow

Really easy to add it into an existing project,

Written in C99...

Great job!

dxroshan - 21 hours ago

Congratulation! Great work! I really like his PlutoVG, LunaSVG and PlutoSVG.

kookamamie - a day ago

Quite nice. Although, it seems to be making some pretty interesting assumptions. For example, most operations seem to assume ARGB inputs are premultiplied-alpha and will call PLUTOFILTER_UNPREMULTIPLY_PIXEL.

ephou7 - a day ago

I'm not sure why single-header is an advantage over powerful libraries such as GEGL.

rossant - a day ago

Any SIMD/multicore capabilities?

countfeng - 21 hours ago

nice, like Blend model