Hey all,<br><br>I can&#39;t seem to use the power (&quot;**&quot;) operator in the ImageMath module.<br><br><br>For example, multiplying an L-mode image by a factor of 2.0 works fine:<br><br>&gt;&gt;&gt; out = ImageMath.eval( &quot;convert( ( a*val ), &#39;L&#39;)&quot;, a=im, val=2.0)<br>

(no errors)<br><br clear="all">However, raising the same image by a power of 2.0 generates a bad operand type error:<br><br>&gt;&gt;&gt; out = ImageMath.eval( &quot;convert( ( a**val ), &#39;L&#39;)&quot;, a=im, val=2.0)<br>

Traceback (most recent call last):<br>  File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;<br>  File &quot;/usr/lib/python2.5/site-<div id=":1hf" class="ii gt">packages/PIL/ImageMath.py&quot;, line 203, in eval<br>
    out =__builtin__.eval(expression, args)<br>
  File &quot;&lt;string&gt;&quot;, line 1, in &lt;module&gt;<br>  File &quot;/usr/lib/python2.5/site-packages/PIL/ImageMath.py&quot;, line 119, in __pow__<br>    return self.apply(&quot;pow&quot;, self, other)<br>  File &quot;/usr/lib/python2.5/site-packages/PIL/ImageMath.py&quot;, line 82, in apply<br>

    raise TypeError, &quot;bad operand type for &#39;%s&#39;&quot; % op<br>TypeError: bad operand type for &#39;pow&#39;<br><br><br>Am I making a silly mistake?<br><br>thanks in advance,<br>Mark<br><br>Ubuntu 8.10 linux, python 2.5.2, Pil 1.1.6</div>