Sign in to follow this  
Followers 0
MvGulik

ImageMagickObject ... -fx "b*0.50"

6 posts in this topic

trying to get ImageMagickObject Object.au3 to work with the following IM command '... -channel red -fx "b*0.50" ...'

$aCmd[1] = '-channel'

$aCmd[2] = 'red'

$aCmd[3] = '-fx'

$aCmd[4] = '"b*0.50"'

Func IM_Manual($This, Const $Image, Const $Dest, Const $aCmd) ;; cmd array input.

$This.IMObj.Convert($Image, $aCmd[0], $aCmd[1], $aCmd[2], $aCmd[3], $aCmd[4], $Dest)

EndFunc ;==>IM_AdaptiveResize

no matter what i do, the last '"a*0.50"' always result/evaluates to zero.


"Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions."
"The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)

"Believing what you know ain't so" ...

Knock Knock ...
 

Share this post


Link to post
Share on other sites



Maybe because you are limiting to the 'red' channel, but using blue for the 'fx'. I am not an ImageMagick expert, but that didn't look right to me.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

IM code is fine. Works perfect when used directly with IM convert.exe. Passing the FX Parameter in the ImageMagickObject UDF is the problem I can't get around.

Edited by iEvKI3gv9Wrkd41u

"Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions."
"The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)

"Believing what you know ain't so" ...

Knock Knock ...
 

Share this post


Link to post
Share on other sites

~ Solved ~ Solved ~ Solved ~

well ... kinda


"Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions."
"The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)

"Believing what you know ain't so" ...

Knock Knock ...
 

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

The Fx Expression Language

<snip>

channel functions:

channel(r,g,b,a), channel(c,m,y,k,a)

<snip>

oops, correction/addition.

symbols:

<snip>

r = red value (from RGBA), of a specific or current pixel

g = green ''

b = blue ''

a = alpha ''

o = opacity ''

<snip>

Edited by iEvKI3gv9Wrkd41u

"Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions."
"The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)

"Believing what you know ain't so" ...

Knock Knock ...
 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0