scipy.misc save image with transparency
<p>I am trying to load a image, turn some of the pixels into transparent by setting the alpha param in scipy.misc module, e.g.:</p>

<pre><code>import scipy.misc as sm
im = sm.imread("tmp.png", mode = "RGBA")
im[0, 0, :] = [0,0,0,0]
</code></pre>

<p>When I try to save it:</p>

<pre><code>sm.imsave("out.png", im)
</code></pre>

<p>The RGB setting for that pixel have been changed (to black in this case), but  the transparency setting does not manifest. How could I fix this?</p>

<p>It turns out this works. I just wasn't aware the jpg format does not support transparency, if you save the image in png then things work.</p>

python image-processing scipy