You Are Here:

Community: Developer Discussion Boards

#1 Old graphics.Image mode - 2008-10-29, 01:14

Join Date: Jun 2007
Posts: 170
lpvalente's Avatar
lpvalente
Offline
Forum Nokia Champion
Hello people,

Is it possible to retrieve the image mode (RGB, RGB16, etc) from a graphics.Image object ?
Reply With Quote

#2 Old Re: graphics.Image mode - 2008-10-29, 02:56

Join Date: Sep 2007
Posts: 395
Location: Bhavnagar
Send a message via Yahoo to james1980
james1980's Avatar
james1980
Offline
Forum Nokia Champion
Hi,
I had not tried it but there is a function called image.inspect(file) that might help you.
Best regards.


Jajal Mehul
Reply With Quote

#3 Old Re: graphics.Image mode - 2008-10-29, 05:32

Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
bogdan.galiceanu's Avatar
bogdan.galiceanu
Offline
Forum Nokia Champion
Quote:
Originally Posted by james1980 View Post
Hi,
I had not tried it but there is a function called image.inspect(file) that might help you.
Best regards.
From the pyS60 Library Reference:
Quote:
Image.inspect(filename)

Note: Not supported in S60 1st Edition!
Examines the given file and returns a dictionary of the attributes of the file. At present the dictionary contains only the image size in pixels as a two-element tuple, indexed by key 'size'. filename should be a full path name.
So that wouldn't help at all.

Luis, use this:
Code:
img=graphics.Image.open("C:\\example.jpg")
print img.mode
Reply With Quote

#4 Old Re: graphics.Image mode - 2008-10-29, 22:08

Join Date: Jun 2007
Posts: 170
lpvalente's Avatar
lpvalente
Offline
Forum Nokia Champion
Hey Bodgan,

Thanks for the reply! It seems this solution is not listed in the documentation ... (at least I didn't find it)
Reply With Quote

#5 Old Re: graphics.Image mode - 2008-10-29, 22:11

Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
bogdan.galiceanu's Avatar
bogdan.galiceanu
Offline
Forum Nokia Champion
True, it isn't. But Image objects have a mode attribute and it seems to be accessible without needing special functions to return it
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
Bluetooth PARK mode vbonnefond Bluetooth Technology 2 2008-11-03 13:05
How about a simple silent mode delay!!! gsgriffin General Discussion 2 2008-01-25 03:04
skinning in landscape mode. ravinder007 General Symbian C++ 0 2007-01-24 12:01
Skinning in landscape mode. ravinder007 Symbian Media (Graphics & Sounds) 1 2007-01-11 11:24
Idle Mode Text on Nokia 6680 nitinkhobragade General Discussion 1 2006-07-10 19:52

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