[Yt-svn] yt-commit r1737 - trunk/yt/extensions
dcollins at wrangler.dreamhost.com
dcollins at wrangler.dreamhost.com
Wed Jun 2 15:40:29 PDT 2010
Author: dcollins
Date: Wed Jun 2 15:40:28 2010
New Revision: 1737
URL: http://yt.enzotools.org/changeset/1737
Log:
Added image scaling to green and alpha channels
Modified:
trunk/yt/extensions/image_writer.py
Modified: trunk/yt/extensions/image_writer.py
==============================================================================
--- trunk/yt/extensions/image_writer.py (original)
+++ trunk/yt/extensions/image_writer.py Wed Jun 2 15:40:28 2010
@@ -54,8 +54,12 @@
blue_channel = _scale_image(blue_channel)
if green_channel is None:
green_channel = na.zeros(red_channel.shape, dtype='uint8')
+ else:
+ green_channel = _scale_image(green_channel)
if alpha_channel is None:
alpha_channel = na.zeros(red_channel.shape, dtype='uint8') + 255
+ else:
+ alpha_channel = _scale_image(alpha_channel)
image = na.array([red_channel, green_channel, blue_channel, alpha_channel])
image = image.transpose().copy() # Have to make sure it's contiguous
au.write_png(image, fn)
More information about the yt-svn
mailing list