You Are Here:

Community: Developer Discussion Boards

#1 Old How to work with *.svg images? - 2008-10-30, 16:25

Join Date: Sep 2008
Posts: 21
JimmPooJimmPoo
Offline
Registered User
hi,

I wrote my first app and it's working fine on my phone
but there is one problem:
in my ap are lots of graphics in *.png format....( app is ~ 2 MB )
I used topwindow to show thom on my screen...

now i want to convert *.png to *.svg with same effect.
is that possible:

Code:
pic=graphics.Image.open("C:\\newpicture.svg")
canvas.blit(pic)
e32.ao_sleep(5)
so what i want is:
show newpicture.svg for 5 seconds and then switch back to backround image of my app...


(I hope you understand it..., sry for my english)
Reply With Quote

#2 Old Re: How to work with *.svg images? - 2008-10-30, 16:36

Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
bogdan.galiceanu's Avatar
bogdan.galiceanu
Online
Forum Nokia Champion
Have you tried it? It's always a good idea to try something before asking questions

The supported formats are jpg, png and gif. sgv images are used for icons, not for being displayed on a canvas.
Reply With Quote

#3 Old Re: How to work with *.svg images? - 2008-10-30, 16:49

Join Date: Feb 2005
Posts: 1,353
Location: Belgium (Europe)
cyke64's Avatar
cyke64
Offline
Super Contributor
Quote:
Originally Posted by bogdan.galiceanu View Post
Have you tried it? It's always a good idea to try something before asking questions

The supported formats are jpg, png and gif. sgv images are used for icons, not for being displayed on a canvas.
SVG and especially SVG-T for S60 phones are vectorial images not bitmap images so exact resolution could be difficult.
Look at this thread for converting tools.

BR
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

#4 Old Question Re: How to work with *.svg images? - 2008-10-30, 17:29

Join Date: Oct 2006
Posts: 30
Location: Austria - Vienna
andipro
Offline
Registered User
Hi,

I've written a SVG-File. Should look like a ball with 3D effect. Works fine on the PC, but the S60 (because of SVG tiny?) ignores the cx cy option of radialGradient:

Code:
<radialGradient id="verlauf" cx ="25%" cy ="25%" r ="85%">
      <stop offset="0%" stop-color="white" />
      <stop offset="75%" stop-color="yellow" />
      <stop offset="100%" stop-color="grey" />
    </radialGradient>
and so the glance of the ball appears simply in the middle
is there a any trick to get same effect ?
Reply With Quote

#5 Old Re: How to work with *.svg images? - 2008-10-30, 22:12

Join Date: Mar 2007
Posts: 153
novis
Offline
Regular Contributor
Hi andipro,
would you share your piece of code that shows how you display the svg in your python script?
We could use "on the fly generated" *.svg images e.g. to display database generated map tiles.

Thx
novis
Reply With Quote

#6 Old Re: How to work with *.svg images? - 2008-10-30, 22:20

Join Date: Feb 2008
Posts: 743
Location: Belo Horizonte, Brazil
Send a message via Skype™ to Rafael T.
Rafael T.'s Avatar
Rafael T.
Offline
Forum Nokia Champion
Quote:
Originally Posted by andipro View Post
Hi,

I've written a SVG-File. Should look like a ball with 3D effect. Works fine on the PC, but the S60 (because of SVG tiny?) ignores the cx cy option of radialGradient:

Code:
<radialGradient id="verlauf" cx ="25%" cy ="25%" r ="85%">
      <stop offset="0%" stop-color="white" />
      <stop offset="75%" stop-color="yellow" />
      <stop offset="100%" stop-color="grey" />
    </radialGradient>
and so the glance of the ball appears simply in the middle
is there a any trick to get same effect ?
Hi andipro,

Well, I think the SVG-Tiny won't get all the data that standard SVG gets. So, in your case it could have excluded some options. I recommend you to draw your SVG instead of writing codes. You can do that in programs such as Inkscape(Basic) or Adobe Illustrator(Professional). If you use Illustrator it will do all the necessary changes when you save the file as SVG-Tiny


BR,

Rafael.
Reply With Quote

#7 Old Thumbs up Re: How to work with *.svg images? - 2008-11-02, 18:59

Join Date: Oct 2006
Posts: 30
Location: Austria - Vienna
andipro
Offline
Registered User
Hi,

and thanks for help.

@novis I did not write a python code to display a svg file. I write a svg file (xml) for use it as icon for my python app

@Rafael T. I've tried Inkscape and svg2svgt (a nice package). But the result is the same. svg2svgt is not able to build a correct working code (means not error but not the wished outfit)

Now I did a compromise. I used linearGradient instead of radialGradient and rotated the circle 45° - so it is a similar effect
Reply With Quote

#8 Old Re: How to work with *.svg images? - 2008-11-04, 10:29

Join Date: May 2004
Posts: 524
Location: Tampere, Finland
jethro.fn's Avatar
jethro.fn
Offline
Forum Nokia Champion
Quote:
Originally Posted by andipro View Post
Hi,

I've written a SVG-File. Should look like a ball with 3D effect. Works fine on the PC, but the S60 (because of SVG tiny?) ignores the cx cy option of radialGradient

...
SVG Tiny has several limitations compared to the full-blown SVG specification. You can see an overview of the limitations in the official SVG Tiny specification, especially chapter 3. Data Types:

Quote:
Percentage

SVGB supports percentages. SVGT does not support percentage values except for the 'width' and 'height' attributes on the outermost 'svg' element.
You need to use "user" coordinates for cx, cy and r. You can set the visible user coordinate region with the viewBox attribute of the outermost <svg> element.

Quote:
Paint

SVGB supports paint specification for fill and stroke operations, as well as linear and radial gradients. SVGT does not support the more general notion of paint specification and thus only supports solid color fills and strokes.
Although SVG Tiny does not support radial and linear gradient fills, the Nokia S60 implementation allows those, according to S60 Platform: Introduction to SVG-T Graphics, version 1.0:

Quote:
On top of the SVG-T 1.1 features, the S60 implementation offers additional support for the following:
  • Opacity
  • Gradients
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
an application that work in emulator and does't work an nokiaE61 kristun General Symbian C++ 2 2008-02-22 12:49
伊莱比特无线技术(北京)有限公司招聘 EB Business/Marketing & Non-Programming -商机/市场及应用开发的一般话题和工作机会 0 2007-10-21 10:01
can this waitforrequest method work? isarc General Symbian C++ 3 2007-06-21 10:53
HttpConnection Connect.Open() wont work Tiger79 Mobile Java General 11 2007-06-14 12:31
CommConnection does not work with Series 60 SDK, but works in JWT jackiechan2001 Mobile Java Tools & SDKs 1 2004-02-04 10:07

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