possible bug with show: IM 6.7.6.9 Q16

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
User avatar
fmw42
Posts: 22083
Joined: 2007-07-02T17:14:51-07:00
Location: Sunnyvale, California, USA

possible bug with show: IM 6.7.6.9 Q16

Post by fmw42 » 2012-05-08T17:48:41-07:00

IM 6.7.6.9 Q16 Mac OSX Snow Leopard.

I am not sure if this is just a problem on my Mac. So I would appreciate it someone could test this on Linux and/or Mac.

Input:
Image

The following works fine if I save to a file (png, gif, jpg) but is much too dark if I output to show:. It also works fine under IM 6.7.4.10 using show:

p=-2
ave="1,1,1,1,1,1,1,1,1"
convert lenag_posnoise_95.jpg lenag_posnoise_95.mpc
p=`echo "scale=0; - $p" | bc`
p1=`echo "scale=0; ($p + 1) / 1" | bc`
pinv=`echo "scale=10; 1 / $p" | bc`
p1inv=`echo "scale=10; 1 / $p1" | bc`
convert \( lenag_posnoise_95.mpc -negate -gamma $p1inv -define convolve:scale=\! -convolve $ave \) \
\( lenag_posnoise_95.mpc -negate -gamma $pinv -define convolve:scale=\! -convolve $ave \) \
-fx "(u/v)" -negate lenag_pnoise_sf10.jpg


Image

vs.

p=-2
ave="1,1,1,1,1,1,1,1,1"
convert lenag_posnoise_95.jpg lenag_posnoise_95.mpc
p=`echo "scale=0; - $p" | bc`
p1=`echo "scale=0; ($p + 1) / 1" | bc`
pinv=`echo "scale=10; 1 / $p" | bc`
p1inv=`echo "scale=10; 1 / $p1" | bc`
convert \( lenag_posnoise_95.mpc -negate -gamma $p1inv -define convolve:scale=\! -convolve $ave \) \
\( lenag_posnoise_95.mpc -negate -gamma $pinv -define convolve:scale=\! -convolve $ave \) \
-fx "(u/v)" -negate show:

However, when I use the X11 interface to save to a file, it also looks fine.

This is all very puzzling. If it can be reproduced, can it be explained to me?

Post Reply