You Are Here:

Community: Developer Discussion Boards

#1 Old Question image_sizes() don't give all sizes expected - 2007-11-28, 21:38

Join Date: Jul 2007
Posts: 23
Location: France, Marseille
Send a message via Skype™ to noreli
noreli's Avatar
noreli
Offline
Registered User
I'm programmaing a camera application for a N95 device.

When I do camera.image_sizes(), I only get [[(1024,768),(640,480)]] resolution options.

The picture are taken with the good camera (it's not taken from the small front one).

What's the reason of those restriction ?
How can I take bigger pics ?

Code:
import camera
print camera.image_sizes()
Last edited by noreli : 2007-11-29 at 11:32. Reason: I found
Reply With Quote

#2 Old Re: image_sizes() don't give all sizes expected - 2007-11-29, 19:15

Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
bogdan.galiceanu's Avatar
bogdan.galiceanu
Online
Forum Nokia Champion
I tried that on my N95 too. The largest I could get was 2MP (1600x1200). I don't know why it doesn't work at full resolution.
Reply With Quote

#3 Old Re: image_sizes() don't give all sizes expected - 2007-11-29, 23:30

Join Date: Jul 2007
Posts: 23
Location: France, Marseille
Send a message via Skype™ to noreli
noreli's Avatar
noreli
Offline
Registered User
Wao ! You're lucky !
I just have 1024x768
Your resolution would be much better for my app requirement.

What version of python do you use ?
What type of signature : Freeware, dev, higher ?
Reply With Quote

#4 Old Re: image_sizes() don't give all sizes expected - 2007-11-29, 23:41

Join Date: Jul 2007
Posts: 23
Location: France, Marseille
Send a message via Skype™ to noreli
noreli's Avatar
noreli
Offline
Registered User
I found a post related to the question in Symbian C++ forum.

http://discussion.forum.nokia.com/fo...858#post319858

They've got a solution in C++
But how can we do that in Python ???
Reply With Quote

#5 Old Re: image_sizes() don't give all sizes expected - 2007-11-30, 08:09

Join Date: Sep 2003
Posts: 209
Location: Finland
otsov
Offline
Regular Contributor
Quote:
Originally Posted by noreli View Post
I'm programmaing a camera application for a N95 device.

When I do camera.image_sizes(), I only get [[(1024,768),(640,480)]] resolution options.
Please have a look at this thread:

http://discussion.forum.nokia.com/fo...d.php?t=118149

Switching to landscape mode prior the "camera" import should expose higher resolutions in the "JPEG_Exif" format.

The underlying reason is really the one discussed in this thread:

http://discussion.forum.nokia.com/fo...d.php?p=319858

Hope this helps.
Reply With Quote

#6 Old Question Re: image_sizes() don't give all sizes expected - 2007-11-30, 11:43

Join Date: Jul 2007
Posts: 23
Location: France, Marseille
Send a message via Skype™ to noreli
noreli's Avatar
noreli
Offline
Registered User
I tried your piece of code, it's better : I have all higher resolutions in camera.image_size(), I can take the picture but I cannot save it!!

Is the JPEG_Exif image in a different format?

I got these error :
Code:
'str' object has no attribute 'save'
Here is the code :

Code:
import appuifw
appuifw.app.orientation='landscape'
import camera
print camera.image_sizes("JPEG_Exif")
pic = camera.take_photo(mode='JPEG_Exif', size = (1600,1200))
pic.save('c:/data/test_picture.jpg')
Did I write a huge error in these piece of code ?
Reply With Quote

#7 Old Re: image_sizes() don't give all sizes expected - 2007-11-30, 12:05

Join Date: Sep 2003
Posts: 209
Location: Finland
otsov
Offline
Regular Contributor
Quote:
Originally Posted by noreli View Post
Is the JPEG_Exif image in a different format?

I got these error :
Code:
'str' object has no attribute 'save'
It returns raw data, just write it to disk:

Code:
j=camera.take_photo('JPEG_Exif', (2592, 1944))
file = open("c:\\test4.jpg",'w')
file.write(j)
file.close()
Hope this helps.
Reply With Quote

#8 Old Question Re: image_sizes() don't give all sizes expected - 2007-11-30, 18:09

Join Date: Jul 2007
Posts: 23
Location: France, Marseille
Send a message via Skype™ to noreli
noreli's Avatar
noreli
Offline
Registered User
Thanks a lot for your great help this is working !

I made a big step forward :-)

BUT I've got then a new problem : The autofocus don't work automatically as I though it was. The quality of picture is not good enough.

Is there a trick to solve this ultimate problem ?
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
Problem enumerating camera sizes on N95 rvogt Symbian Media (Graphics & Sounds) 10 2007-11-29 23:53
Conflicting stack sizes - again! schm1 Mobile Java General 7 2005-10-08 13:09
What these compile errors mean? (Visual Studio .NET) chishti.hameed General Symbian C++ 4 2005-08-12 08:07
Font sizes civax Mobile Java General 1 2004-09-21 06:00
Recommended Sizes for MMS Image, Text and Layout sguthery General Messaging 3 2003-08-22 10:10

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