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?".
thank you tho also for helping me clarify what I needed Snibgo...I appreciate the help always...
In the above provided solution by Fmw42, if I wanted to have it choose red values that were say between 125 and 145 (thus capturing the range of R) could this command line script be modified to do that as well? (versus only capturing "132")
Thank you Snibgo...and for all the replies and patience to my Noobism
I really really love what I have found out that ImageMagick can do...just going thru and trying to read every page of options, tools, example...I mean...this opens up so much more for me than photoshop (not that it isn't amazing in how far it has come over the years too) but I work in the visual simulation world, and once I know this tool much better, I plan on never having to use Pshop Actions ever again! I can't batch using IM so much more efficiently and repeatably once I understand more.
Anyway...thank you again for helping me get started.
I think the command line argument / script is giving me colors I do not want...
convert file-in.dds -channel r -separate +channel -fill black -fuzz 5% +opaque "gray(132)" -fill white -opaque "gray(132)" file-out.png
the RED color channel is the only color that the range can be selected from based on the formula:
color r = face->normal().z * 127.0 + 127.5;
color g = face->normal().y * 127.0 + 127.5;
color b = face->normal().x * 127.0 + 127.5;
I am trying to select all vertical faces (within a 5º margin of error) in my model's texture.
the gray(132) as I read it, means:
gray = rgb(126, 126, 126)...
what I want is:
rgb(132, *, *)
OR an exact colors: (as an example)
R=127-224
G=*
B=*
It is giving you 5% on each side of 132. In this context it is only 5% on each side of red=132 due to the use of -channel r -separate. You must compute the range of values on each side of the center of the range and use the center of the range as the gray value.
For example 105% of 132 = 139 and 95% of 132 = 125 (rounded to the nearest integer). So you will get red in the range of 125 to 139 and all values of green and blue for those red values.
fmw42 wrote:It is giving you 5% on each side of 132. In this context it is only 5% on each side of red=132 due to the use of -channel r -separate. You must compute the range of values on each side of the center of the range and use the center of the range as the gray value.
For example 105% of 132 = 139 and 95% of 132 = 125 (rounded to the nearest integer). So you will get red in the range of 125 to 139 and all values of green and blue for those red values.
Ok thank you...
Perhaps in a later release there could be a -range(125-132) ?