| Reply | « Previous Thread | Next Thread » |
|
Dear All
I wish to print date on the image captured by camera. I mean when we take photo from camera, there should be some date to be printed on any part of the image like when we take photo using digital still camera. I dont find any details on how to write some data on image.. Thanks ![]() ||Kiran || Nokia E-65 Nokia 7610 Nokia N95 8GB Nokia E90 Nokia 5110 !! Nokia 6110i !! |
|
Dear Forum
Since long i am observing that nobody is replying to my posts...!!! Only LFD is the person who always tries to solve my problem... Did i have done any mistake in past in asking any question? If yes then do tell me. I have come to forum for learning as i am python beginner... If nobody is going reply my queries then it really hurts me that what is the meaning of asking... Please help me ... i think my questions are not SO HARD for you expert guys over there... PLEASE I REQUEST YOU>>> HELP ME kiran ![]() ||Kiran || Nokia E-65 Nokia 7610 Nokia N95 8GB Nokia E90 Nokia 5110 !! Nokia 6110i !! |
|
I don't think you are the only one getting no answers. I've noticed that this forum has stagnated in the past couple of weeks. Perhaps people are weary of waiting for PyS60 to reach stability.
As for your original question, the graphics module can be used to read image files, draw on them and save them. Unfortunately the font support is still broken on 3rd Edition, so text rendering is impossible at the moment (or at least requires a third party module). Code:
import graphics
# Load image to memory.
img = graphics.Image.open("E:\\original.jpg")
# Modify image in memory. Draw a red rectangle in the middle.
w, h = img.size
img.rectangle((w / 3, h / 3, w * 2 / 3, h * 2 / 3), fill = (255, 0, 0))
# Save image back to disk (memory card, actually).
img.save("E:\\modified.jpg", quality = 90)
|
|
Code:
import camera
import time
img = camera.take_photo()
img.text((20,img.size[1]-25),time.strftime("%d/%m/%Y %H:%M:%S").decode(),font=u"LatinBold19",fill=(255,255,0))
img.save("E:\\Images\\photo.jpg")
Bye |
|
Quote:
We own this distribution to GameDude that pointed out the solution for having visible fonts with the text method. Also there are still few bugs due to the modification. Read more in the previous link I gave you. LFD Devices: Nokia E61 3rd Edition - pys60 1.4.0 Tips and modules: http://www.lfdm.net/thesis |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| --- ???save image problem??? --- | ferenn | Mobile Java Media (Graphics & Sounds) | 6 | 2007-10-01 15:33 |
| Opening a JPEG Image | ummarbhutta | Mobile Java Media (Graphics & Sounds) | 8 | 2007-02-15 07:34 |
| how to cut some part of Image | mshouab | Mobile Java Media (Graphics & Sounds) | 2 | 2006-08-04 10:05 |
| HELP: Mutable Image to Immutable Image? | rj_cybersilver | Mobile Java Media (Graphics & Sounds) | 1 | 2005-03-26 10:58 |
| Nokia Image Converter | davidpurdie | General Discussion | 0 | 2004-02-18 16:31 |