Join Now
Quality Rating:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)
Expertise Level:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)

This page was last modified 05:33, 29 April 2008.

How to add a text to an image

From Forum Nokia Wiki

This article contains code snippets showing how text can be added to an image or a photo, using Python.

How to add text to an image:

from graphics import *
 
bg=Image.new((240,240))
bg.text((30,30), u"Text", font="title")
bg.save("C:\\a.jpg", quality=100)

How to add text to a photo (the procedure is the same as above:

from graphics import *
 
photo=Image.open("c:\\myphoto.jpg")
photo.text((45,30), u"Text goes here", font="normal")
photo.save("c:\\mynewphoto.jpg")


See also: How to edit an image

Related Discussions
Thread Thread Starter Forum Replies Last Post
Working fine on emulator but not on Device gaurav17281 Mobile Java General 3 2003-07-24 19:14
3510i www.wap.it dont work well. maxsoftnokia General Browsing 2 2003-08-22 16:44
7650 font color problems non-display buffer images. AndrewMiah Mobile Java General 1 2003-03-17 05:53
How to display an image? help! Mich2424 General Symbian C++ 12 2006-04-05 13:56
adding text to CEikEdwin or CEikGlobalTextEditor ThreeSixFiveOh Symbian User Interface 6 2004-01-05 03:24
 
Powered by MediaWiki