<div dir="ltr">Th save_image function also takes a clip_ratio keyword argument. This keyword is used to "clip" pixels that have much higher intensity contrast than the test of the image, producing more pleasing histogram equalization. I'd suggest supplying clip_ratio to save_image as well.<div><br></div><div>-Nathan</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 6, 2015 at 8:43 AM, Reju Sam John <span dir="ltr"><<a href="mailto:rejusamjohn@gmail.com" target="_blank">rejusamjohn@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><br><div dir="ltr">Hi all,<div><br></div><div>I am trying to do some volume rendering with the following script. </div><div><br></div><div><div><br></div><div><font face="monospace, monospace" size="4">    tf = yt.ColorTransferFunction((-29, -24))</font></div><div><font face="monospace, monospace" size="4">    tf.add_layers(4, w=0.01)</font></div><div><font face="monospace, monospace" size="4">    cam = ds.camera([5.020844896e-01, 4.934331785e-01, 4.921018057e-01], [0.0, 0.0, 1.0], (20, 'Mpc'), 640, tf, fields=["density"], log_fields="False", no_ghost=False)</font></div><div><font face="monospace, monospace" size="4">    image = cam.snapshot(fn="density_vol_"+fn_i+".png")</font></div><div><font face="monospace, monospace" size="4">    cam.save_image(image, clip_ratio=4, transparent=False)</font></div><div><font face="monospace, monospace" size="4">    cam.show(clip_ratio=4)</font></div><div><br></div><div><br></div><div><br></div>But the problem is that the image saved using <span style="font-family:monospace,monospace;font-size:large">cam.save_image()</span> is different from the one displayed by  <span style="font-family:monospace,monospace;font-size:large">cam.show(clip_ratio=4)</span></div><div><span style="font-family:monospace,monospace;font-size:large"><br></span></div><div><span style="font-family:monospace,monospace;font-size:large">Displayed image using </span><font face="monospace, monospace" size="4">cam.show(clip_ratio=4)</font></div><div><span style="font-family:monospace,monospace;font-size:large">​<div class="gmail_chip gmail_drive_chip" style="width:396px;min-height:18px;max-height:18px;padding:5px;color:rgb(34,34,34);font-family:arial;font-style:normal;font-weight:bold;font-size:13px;border:1px solid rgb(221,221,221);line-height:1;background-color:rgb(245,245,245)"><a href="https://drive.google.com/file/d/0B6l5iRWTUbHWa054VDVNOFY1bGpqVklqYlA3ZEhzazhwZWhr/view?usp=drive_web" style="display:inline-block;max-width:366px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration:none;padding:1px 0px;border:none" target="_blank"><img style="vertical-align:bottom;border:none" src="https://ssl.gstatic.com/docs/doclist/images/icon_11_image_list.png"> <span dir="ltr" style="color:rgb(17,85,204);text-decoration:none;vertical-align:bottom">download.png</span></a></div>​<br></span></div><div><span style="font-family:monospace,monospace;font-size:large">Saved image using </span><font face="monospace, monospace" size="4">cam.save_image()</font></div><div><font face="monospace, monospace" size="4">​<div class="gmail_chip gmail_drive_chip" style="width:396px;min-height:18px;max-height:18px;background-color:#f5f5f5;padding:5px;color:#222;font-family:arial;font-style:normal;font-weight:bold;font-size:13px;border:1px solid #ddd;line-height:1"><a href="https://drive.google.com/file/d/0B6l5iRWTUbHWUmhXVGZfY0xiMXBGUW81Szh0LU0yZFI5enFB/view?usp=drive_web" style="display:inline-block;max-width:366px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration:none;padding:1px 0;border:none" target="_blank"><img style="vertical-align:bottom;border:none" src="https://ssl.gstatic.com/docs/doclist/images/icon_11_image_list.png"> <span dir="ltr" style="color:#15c;text-decoration:none;vertical-align:bottom">density_vol_10.png</span></a></div>​<br></font></div><div><span style="font-family:monospace,monospace;font-size:large"><br></span></div><div>Why this is happening ? How to save the same image as of displayed one?<br></div><div><br></div><div> Thank you </div><span class="HOEnZb"><font color="#888888"><span><font color="#888888"><div> <br><div><div dir="ltr">Reju Sam John</div></div>
</div></font></span></font></span></div><span class="HOEnZb"><font color="#888888">
</font></span></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr">Reju Sam John</div></div>
</font></span></div>
<br>_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" rel="noreferrer" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></blockquote></div><br></div>