bug in fx function
-
- Posts: 9
- Joined: 2012-01-12T08:06:23-07:00
- Authentication code: 8675308
bug in fx function
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
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
-
- Posts: 9
- Joined: 2012-01-12T08:06:23-07:00
- Authentication code: 8675308
Re: bug in fx function
Can someone in ImageMagick please help me with that?
Thanks!
Thanks!
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: bug in fx function
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.
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.
-
- Posts: 9
- Joined: 2012-01-12T08:06:23-07:00
- Authentication code: 8675308
Re: bug in fx function
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
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
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: bug in fx function
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.
snibgo's IM pages: im.snibgo.com
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: bug in fx function
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.
But I could be wrong.
snibgo's IM pages: im.snibgo.com
-
- Posts: 9
- Joined: 2012-01-12T08:06:23-07:00
- Authentication code: 8675308
Re: bug in fx function
Sorry for the bad links, here another one:
correct: http://imgur.com/uxxbu7Y,8Neapcc#0
wrong: http://imgur.com/uxxbu7Y,8Neapcc#1
correct: http://imgur.com/uxxbu7Y,8Neapcc#0
wrong: http://imgur.com/uxxbu7Y,8Neapcc#1
-
- Posts: 9
- Joined: 2012-01-12T08:06:23-07:00
- Authentication code: 8675308
Re: bug in fx function
Some area that there is no value for them are filled by virtual pixel, and image has problems in those areas.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: bug in fx function
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.
This may be a Windows only issue.
-
- Posts: 9
- Joined: 2012-01-12T08:06:23-07:00
- Authentication code: 8675308
Re: bug in fx function
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.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: bug in fx function
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.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.
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