Page 1 of 1

Outline image, use colors from surroundings.

Posted: 2017-05-21T13:51:55-07:00
by coolperez8
So, I have a transparent image, and I want to outline it with it's own colors. I want the color of each pixel to be determined by the pixels next to it, with semi-transparent pixels having less effect than fully opaque pixels, and fully transparent pixels having no effect at all. Unfortunately, I can't find any image as an example for the effect.

ImageMagick Version:
Version: ImageMagick 6.8.9-9 Q16 x86_64 2017-03-14 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC Modules OpenMP
Delegates: bzlib cairo djvu fftw fontconfig freetype jbig jng jpeg lcms lqr ltdl lzma openexr pangocairo png rsvg tiff wmf x xml zlib

OS: Ubuntu 16.04

Re: Outline image, use colors from surroundings.

Posted: 2017-05-21T14:01:56-07:00
by snibgo
You could blur the image slightly, then composite the original over the blur.

Re: Outline image, use colors from surroundings.

Posted: 2017-05-21T18:19:10-07:00
by fmw42
What is the purpose of this?

How do you define "the pixel next to it"? In what direction?

How thick an outline?

Without an example input and output, it is hard to know exactly what you want.