I'm a Newbie trying to create "color-spotting" or "color splash" based on this post using Python on RaspbianGNU/Linux10(buster), the image below shows the wanted result which is convert an image to gray-scale color except one color:

the code I'm running is:
Code: Select all
import subprocess
imageMagicCmd = ["sudo", "/usr/bin/convert", "/home/pi/Desktop/imageMagicTest/1.jpg", "-matte", "+clone", "-fuzz", "30%", "-transparent", "blue", "-compose", "DstOut", "-composite", "/home/pi/Desktop/imageMagicTest/all_blue_colors.png"]
subprocess.call(imageMagicCmd)
many thanks in advance,
Ram