Page 1 of 1
bug in fx function
Posted: 2014-01-15T07:54:03-07:00
by sara_shafaei
It seems that virtualpixelmethod is not working in fx function anymore. I installed imagemagick 6.8.7-8 on my windows machine, I had imagemagick 6.8.0-10 on my mac. When I run the same command, I am getting different result. the command is:
convert -size 1096x1 xc: -virtual-pixel black -fx "xc=548; xd=(i-xc)/172; ffx=(1/pi)*asin(xd); xs=0.5*(ffx+(xc-i)/(xc))+0.5; xd>1?1:xs" -scale 1096x309! "out.png"
so in new version, pixels that should be assigned with virtual pixel ( which is black here), they have values. Is it brokenin this version? Can u please advise me on that.
Thanks,
~Sara
Re: bug in fx function
Posted: 2014-01-21T15:25:01-07:00
by sara_shafaei
Can someone in ImageMagick please help me with that?
Thanks!
Re: bug in fx function
Posted: 2014-01-21T16:17:06-07:00
by fmw42
I get results that are identical when using IM 6.8.8.2 and 6.8.6.8 on Mac OSX Snow Leopard. In both cases, the left third is black, the middle third is gray and the right third is white.
What do you think is the correct result? Can you post a link to your correct image? You post to some free image hosting service such as dropbox and put a link here.
Re: bug in fx function
Posted: 2014-01-22T09:19:15-07:00
by sara_shafaei
Thanks for your reply. I upload the result here:
https://www.dropbox.com/home/imagemagick_result
first one (correct.png), I got it from IM 6.8.0-10 in my mac OSX Lion, which is suppose to be like that.
second one(wrong.png), I got it from IM 6.8.7-8 in Parallel (virtual machine ) , Windows 7 on same machine (mac-Lion).
I used exactly same command for both. Anything else work great, it is just this one, which I am guessing is fx doesn't pick up virtual method. virtualmethod is working for other places, just not working in fx.
Thanks again,
~Sara
Re: bug in fx function
Posted: 2014-01-22T09:30:28-07:00
by snibgo
Your link is bad. It works for you because you are logged into your dropbox account. You need to find the links to your pictures, and paste those here.
Re: bug in fx function
Posted: 2014-01-22T09:36:03-07:00
by snibgo
I'm not an expert at fx, but I can't see how virtual-pixel can make a difference. The output colour depends only on "i", not on anything else.
But I could be wrong.
Re: bug in fx function
Posted: 2014-01-22T10:08:32-07:00
by sara_shafaei
Re: bug in fx function
Posted: 2014-01-22T10:10:24-07:00
by sara_shafaei
Some area that there is no value for them are filled by virtual pixel, and image has problems in those areas.
Re: bug in fx function
Posted: 2014-01-22T10:45:35-07:00
by fmw42
I get results that are identical to your good result when using IM 6.8.8.2 and 6.8.6.8 on Mac OSX Snow Leopard. In both cases, the left third is black, the middle third is gray and the right third is white.
This may be a Windows only issue.
Re: bug in fx function
Posted: 2014-01-22T11:51:33-07:00
by sara_shafaei
So it maybe problem in 6.8.7-8 and it is fixed in IM 6.8.8.2. If I switch to IM 6.8.8.2 that may solve the problem.
Re: bug in fx function
Posted: 2014-01-22T13:49:59-07:00
by fmw42
sara_shafaei wrote:So it maybe problem in 6.8.7-8 and it is fixed in IM 6.8.8.2. If I switch to IM 6.8.8.2 that may solve the problem.
Yes, it is possible it is a bug in just that version 6.8.7-8. But I ran your command against 6.8.7.8 in Mac OSX and it works just fine.
perhaps in Windows you need to escape the ! as ^! or put the whole value in double quotes.
convert -size 1096x1 xc: -virtual-pixel black -fx "xc=548; xd=(i-xc)/172; ffx=(1/pi)*asin(xd); xs=0.5*(ffx+(xc-i)/(xc))+0.5; xd>1?1:xs" -scale 1096x309
^! out.png
or
convert -size 1096x1 xc: -virtual-pixel black -fx "xc=548; xd=(i-xc)/172; ffx=(1/pi)*asin(xd); xs=0.5*(ffx+(xc-i)/(xc))+0.5; xd>1?1:xs" -scale
"1096x309!
" out.png