EditableImage Image Blur Module

hi

i am happy to share a module which blurs images asap!

type QuickBlurImpl = {
	Blur : (self : QuickBlurImpl, Image : EditableImage, Size : number?, Desample : number?) -> EditableImage
}

function QuickBlur:Blur(Image, Size, Desample)
	
	-- Arguments
	-- Image : Feed me an EditableImage
	-- Size [OPTIONAL] : How blury the image should be. Large values may take some time to compute, < 8 is good enough
	-- Desample  [OPTIONAL] : Lowers the image resolution for faster processing, doesn't really effect the blur result
	

on an Intel i5-7300U with default parameters:

QuickBlur:Blur(Image, 4, 6)

it takes:
0.03 seconds for a 512x512 image
0.06 seconds for a 1024x752 image

it’s a bit faster with !native but i’m all out of ideas rn on how to further improve performance

get the module here!

11 Likes

Not bad but I made a similar module to this: Editable Images... what are they?

1 Like

I’m going to use this to censor images of cats

2 Likes

Sensitive Content: This post may contain cat content.
See post…

3 Likes

Yes but yours is slow and theirs isn’t

7 Likes

Woops, I did not knew that! Thanks! (Sarcasm)

2 Likes