On Sun, Nov 15, 2020 at 12:31:22AM +0100, Emanuel Berg wrote: > Hello, is there a tool/command/script anywhere that can overwrite > with a single color (or make transparent) every pixel to the left, > above, right, and below a certain other color? > > e.g., if one draws a loop of black, tell the program black is the > border, the result would be only what is within the loop?
Your request is a bit... unspecific. Are you (a) after a tool which you use interactively, where you actually see the image you described above, and where you can click into that loop to start the operation? Or is it (b) rather some kind or "batch mode", where you give the program the image file *plus* the coordinates of that point inside the loop where to start? For ease of search, the operation you're describing is usually called "flood fill". If you are after (a), your friend is The Gimp; I guess Krita will fill that bill as well. If it's (b), the usual standard is "mogrify", from the ImageMagick suite. Look at [1] for the details on flood fill. Getting warm with the ImageMagick programs takes a bit of practice, but it's worth it. Come back if you get stuck. Cheers [1] https://imagemagick.org/script/command-line-options.php#floodfill - t
signature.asc
Description: Digital signature