Archive for the ‘Handphone’ Category

link tutorial pys60 about canvas in forum nokia

http://wiki.forum.nokia.com/index.php?title=Special:Search&limit=20&offset=20&ns0=1&redirs=0&searchx=1&search=image+blit

http://croozeus.com/blogs/?p=215

import appuifw
import graphics

# Creates new image with size 50,50 and uses mode 1
# Mode 1 indicates the image is only black and white - this is required for using masks
# You can replace '1' by 'L' if you want to use a 8-bits grayscale image
mask_img = graphics.Image.new(size = (50, 50), mode = '1')
# Loads the mask
mask_img.load('E:\\mask.png')
# Opens main image
main_img = graphics.Image.open('E:\\original.png')
# Defines canvas for using as the application body
canvas = appuifw.Canvas()
# Sets the body to canvas
appuifw.app.body = canvas
# Blits the image with it's mask
canvas.blit(main_img, target=(0,0), source=(0,0), mask = mask_img)