You Are Here:

Community: Developer Discussion Boards

#1 Old Image and transparency, icons and canvas - 2006-11-15, 15:44

Join Date: May 2006
Posts: 622
Location: Oulu, Finland
lfd
Offline
Super Contributor
Hi guys!

I have to display an image on a canvas. So far not that difficult. Now my problem is: how to display a .png on a canvas with transparency??

That might not be possible since the image is loaded as a bitmap.

Better, I'd like to put some icons from "avkon.mbm" on the canvas where I could have the transparency for the icons. But no can do since it's an Icon object and not an Image object...

So if someone knows something please share it, that would save me a headache

LFD


Devices:
Nokia E61 3rd Edition - pys60 1.4.0

Tips and modules:
http://www.lfdm.net/thesis
Reply With Quote

#2 Old Re: Image and transparency, icons and canvas - 2006-11-15, 16:11

Join Date: Feb 2005
Posts: 1,353
Location: Belgium (Europe)
cyke64's Avatar
cyke64
Offline
Super Contributor
Quote:
Originally Posted by lfd
Hi guys!

I have to display an image on a canvas. So far not that difficult. Now my problem is: how to display a .png on a canvas with transparency??

That might not be possible since the image is loaded as a bitmap.
hello lfd

It's not difficult. We have already discussed of this subject Look at this discuss for displaying icons from mbm with transparency with automask function and easy conversion between Icon and Image !
Quote:
Originally Posted by lfd
Better, I'd like to put some icons from "avkon.mbm" on the canvas where I could have the transparency for the icons. But no can do since it's an Icon object and not an Image object...

So if someone knows something please share it, that would save me a headache

LFD
For putting Icon content on canvas and displaying all icons of avkon.mbm and their mask
For 3rd Edition phones it's not possible to use avkon.mbm because of new scallable UI (avkon.mbm is absent from phone now !) You must use SVG-T format (vector graphic) ...

I hope that I have been as fast as possible to save you an headache

Regards Cyke64


pys60 1.4.5,1.9.7,pygame,PyS60 CE on E90 , N810 with Python 2.5.2 and ... last PyS60 1.9.7 with touch ui on 5800 !

pys60 extension modules on http://cyke64.googlepages.com/
Reply With Quote

#3 Old Re: Image and transparency, icons and canvas - 2006-11-20, 11:52

Join Date: May 2006
Posts: 622
Location: Oulu, Finland
lfd
Offline
Super Contributor
Great Cyke!

Thanks a lot, displaying icons on the canvas works. But I still have that problem that I'm displaying them on a blue background. I don't see how I could get the transparency on a canvas. I'm scared I'll have to extract every icons I need and color the white parts with the color I need...

LFD


Devices:
Nokia E61 3rd Edition - pys60 1.4.0

Tips and modules:
http://www.lfdm.net/thesis
Reply With Quote

#4 Old Re: Image and transparency, icons and canvas - 2006-11-21, 17:21

Join Date: Dec 2004
Posts: 646
jplauril's Avatar
jplauril
Offline
Forum Nokia Expert
The blit method has an optional argument "mask" that can be used to select which parts are blitted.
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
Opening a JPEG Image ummarbhutta Mobile Java Media (Graphics & Sounds) 8 2007-02-15 07:34
DirectUtils.createImage Transparency problem pippopippi Mobile Java Tools & SDKs 2 2003-03-22 01:18
Sprites management remarks atomictag Mobile Java General 0 1970-01-01 02:00

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia