# Utility for GPU based image blurring



## jbo (Oct 4, 2021)

I'm using graphics/ImageMagick7 to blur an image in a shell script. This is a pretty slow process (it's CPU only and inherently slow that way).

Are there any utilities available that can be utilized to blur an image using GPU acceleration?

As for ImageMagick: For most use cases, the recommendation is to use `-blur` instead of `-gaussian-blur` (which I do) and for large images to scale them down and back up again. However, this is not an option in my particular situation.
I'd like to know whether there are other off-the-shelf solutions I can employ or whether I have to roll my own (which I'd rather not).


----------



## Alexander88207 (Oct 4, 2021)

Your application seems to have some features accelerated (including blur) through OpenCL.

But i dont know if OpenCL is being used here.









						ImageMagick
					

Create, Edit, Compose, or Convert Digital Images




					imagemagick.org


----------



## sidetone (Oct 5, 2021)

I found out about graphics/gd a while ago as an alternative to ImageMagick. It's a library, but if I remember correctly, it's used directly with php (maybe python, shell or other script) commands to edit images. I've never used it, but there are examples of it for editing images.



> graphics/gd               Graphics library for fast creation of images
> gd is a graphics library. It allows your code to quickly draw images
> complete with lines, arcs, text, multiple colors, cut and paste from
> other images, and flood fills, and write out the result as a PNG, GIF
> ...




For ImageMagick, using the -nox11 package or port option may make it a little faster, as it will have less dependencies. A shell script doesn't need the x11 part.


----------

