adding text to image using python
<p>Is the following function correct, this code is meant to add a phrase to image. Note that i cannot use image.text function or any other but can only use getpixel, putpixel, load, and save.</p>

<pre><code>def insertTxtImage(srcImage, phrase):
    pixel = srcImage.getpixel(30,30);
    srcImage.putpixel(pixel,phrase);
    srcImage.save;
pass
</code></pre>

<p>Yes it is homework which can only use getpixel, putpixel, load, and save to insert a phrase in to the image.</p>

<p>I tried to do this with this code but it is giving system error (argument is not a tuple)</p>

<p>def insertTxtImage(srcImage, phrase):<br>
    pix = srcImage.load()<br>
    pix[0,0] = phrase<br>
    srcImage.save()<br>
 pass    </p>

<p>Thanks for the comments.</p>
