Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
I saw this great new color plugin/app that helps "color pop" images. It seems to smartly identify the primary colors / objects in the image and lets you pic which ones are colored. It's even open source.
I'm wondering how I'd reproduce some of these effects in IM. I know how to selectively color an image... I'm not sure how it's identifying the specific objects / colors to focus on. Any ideas?
What does the input image look like? Does it have any color, all color or no color?
Probably finds some color with some fuzz factor, creates mask, enhances the hue and or saturation (-modulate) using the mask and then composites that using the mask with a grayscale version.
<?php
// Create a new image with everything transparent apart from the selected colour.
// This image must be saved as a png due to the transparency.
exec("convert ../original_images/bathhat.jpg -matte \\
\( +clone -fuzz 20% -transparent rgb\(38,134,71\) \) \\
-compose DstOut -composite output_hat.png");
// Another tempory image is made from the original but completely grey.
exec("convert ../original_images/bathhat.jpg \\
-colorspace Gray grey_background.jpg");
// The two images are combined and flattened into one image.
exec("convert grey_background.jpg -page +0+0 \\
output_hat.png -flatten green.jpg");
// The tempory images are deleted.
unlink ('output_hat.png');
unlink ('grey_background.jpg');
?>