Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Saving camera picture
Started by Vasu Feb 12 2012 05:34 AM

- - - - -
38 replies to this topic
[TOPIC CONTROLS]
Page 2 of 2 1 2
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#26

soltesz.zsolt52

[GLOBAL: userInfoPane.html]
soltesz.zsolt52
  • Observer

  • 14 posts
  • Corona SDK

Hi,

It looks when I am saving image by 3rd argument of media.show(). The process is very slow and
onComplete() eventhandler is fired before image was saved. There is solution for it ?

Cheers,
Zsolt
uid: 126421 topic_id: 21784 reply_id: 112379


[TOPIC: post.html]
#27

Joshua Quick

[GLOBAL: userInfoPane.html]
Joshua Quick
  • Moderator

  • 3,397 posts
  • Corona Staff

Zsolt,

The slow write to file is a known issue. We have a bug report written up, #13782, to write the selected image to file asynchronously instead of doing a blocking write when returning to the Corona app. The only work-around is to not save to file and show the selected image as a display object instead, but then you don't get the full-resolution of the selected photo.
uid: 32256 topic_id: 21784 reply_id: 112396


[TOPIC: post.html]
#28

soltesz.zsolt52

[GLOBAL: userInfoPane.html]
soltesz.zsolt52
  • Observer

  • 14 posts
  • Corona SDK

Dear Joshua,

Thank you for your answer. But when I show selected image as a display object and Im trying to save by display.save() I can get a deformed picture with a black stripe. Any help please ?

Thank you.
uid: 126421 topic_id: 21784 reply_id: 112448


[TOPIC: post.html]
#29

Joshua Quick

[GLOBAL: userInfoPane.html]
Joshua Quick
  • Moderator

  • 3,397 posts
  • Corona Staff

Zsolt,

Are you using an old daily build? The deformed image issue was a bug that we introduced in daily build 759, but the newest daily build fixes it.

If you are using the newest daily build, then can you post a screenshot of what the image looks like? That way I can better understand what may be going wrong.
uid: 32256 topic_id: 21784 reply_id: 112563


[TOPIC: post.html]
#30

borgb

[GLOBAL: userInfoPane.html]
borgb
  • Contributor

  • 291 posts
  • Corona SDK

Any news regarding the bugs with reading the rotation/EXIF info from the full resolution photo? I'd really like to get mye app out but I dont want to release an app with sub par functionality so that leaves me waiting for this bug to be fixed. :(

Slow write to file would also come under that. Hope some focus is to be given to the camera related bugs soon.
uid: 17969 topic_id: 21784 reply_id: 112624


[TOPIC: post.html]
#31

Joshua Quick

[GLOBAL: userInfoPane.html]
Joshua Quick
  • Moderator

  • 3,397 posts
  • Corona Staff

borgb,

The iOS EXIF issue is on our backlog at the moment. It's lower priority compared to the other iOS issues that we have to deal with. Partly because most Corona developers are not using this feature. Probably not want you wanted to hear, but I'm just being honest with you.

My advise is don't wait for us to fix it. Work-around it by not saving it to file and displaying it as a display object instead.

You can now find our bug list and which bugs we plan on addressing next via the below link. The bug that you are referring is #13183.
http://www.coronalabs.com/resources/bugs/
uid: 32256 topic_id: 21784 reply_id: 112681


[TOPIC: post.html]
#32

borgb

[GLOBAL: userInfoPane.html]
borgb
  • Contributor

  • 291 posts
  • Corona SDK

That would not be an acceptable workaround for me, it would make the use of my app less then what people are used to and expect. Saving it as a display object would in most cases give a to low quality photo to be used for anything but displaying on the phone.

I can understand other priorities but this should also be an easy thing to fix. I cant quite understand why the bug is there in the first place. And maybe the reason people are not using it is because the camera functionality is poor with corona? I got lots of ideas for apps using camera and a quick look at the appstore shows a huge market for this. To bad if corona dosent want to take part in that, it could be the perfect engine for it.
uid: 17969 topic_id: 21784 reply_id: 112688


[TOPIC: post.html]
#33

Joshua Quick

[GLOBAL: userInfoPane.html]
Joshua Quick
  • Moderator

  • 3,397 posts
  • Corona Staff

The bug is there because Corona for iOS is not reading the file's EXIF settings and then rotating the image if an orientation setting was found. iOS does not do this for free. We have to code this ourselves. It's not hard. It just takes time. We just happened to have already coded this on Android.

Perhaps another way you can work-around this is to have our API save to file and then read the file's EXIF data yourself via Lua's standard file IO functions. Who knows, maybe there is already a Lua library out there that will read EXIF data for you.
uid: 32256 topic_id: 21784 reply_id: 112690


[TOPIC: post.html]
#34

borgb

[GLOBAL: userInfoPane.html]
borgb
  • Contributor

  • 291 posts
  • Corona SDK

@Joshua Quick
Yeah, I have converted another lua library that was for editing user comments with CHDK called tagMe. Had to do abit of adjustments to it but think I got it working pretty good now at least. Cant seem to read all the ID tags ut at least I find the orientation one and for now that will have to do. Still have alot of testing to do and I need to check with different devices so its not a problem. And with different types of files imported to the device photoalbum as well as directly from camera so there is not a problem there. I would rather see all this fixed direclty in corona but will do some exstensive testing and if nothing fails, whatever works.

Still the thing with abit of a long wait with saving files and the option to save the full res file to photoalbum but those things I can wait for at least.

uid: 17969 topic_id: 21784 reply_id: 112938


[TOPIC: post.html]
#35

burak.o.can

[GLOBAL: userInfoPane.html]
burak.o.can
  • Observer

  • 4 posts
  • Corona SDK

borgb,

Are you writing these EXIF settings yourself? If so is it possible for you to share your solution. I also have an app that heavily relies on the camera.

Corona labs, it would be great if we could control the resolution / quality of the image saved when using the media.show functionality.

Thanks
uid: 44416 topic_id: 21784 reply_id: 120255


[TOPIC: post.html]
#36

borgb

[GLOBAL: userInfoPane.html]
borgb
  • Contributor

  • 291 posts
  • Corona SDK

burak.o.can:
I'm not writing any settings, I'm just reading the orientation of the image in the exif info and then rotating the image to display it properly on the screen. Have to do this since corona dosent rotate the high res image from the camera correctly under iOS. I found an exif modul on the net written in LUA and made it work with corona. Mine is pretty messy and I got no idea if there is much use to it except to fix my problem..

But the original file can be found here:
http://forum.chdk-treff.de/viewtopic.php?t=1555
uid: 17969 topic_id: 21784 reply_id: 120462


[TOPIC: post.html]
#37

deano

[GLOBAL: userInfoPane.html]
deano
  • Observer

  • 13 posts
  • Corona SDK

@Joshua Quick : I have an app where I need to print a form. Screengrabs come out too blurry. I really need to be able to save a form at a set resolution, (high), so it's consistent across all devices. Any chance there is a solution or at least something on it's way? Thanks.
uid: 67683 topic_id: 21784 reply_id: 129035


[TOPIC: post.html]
#38

Joshua Quick

[GLOBAL: userInfoPane.html]
Joshua Quick
  • Moderator

  • 3,397 posts
  • Corona Staff

deano,

Are you referring to iOS saving screenshots as JPEGs? We believe the correct solution to that problem is to support saving to PNGs on iOS, like what we do on Android. That is on our to-do list, but it's really low priority compared to everything else.
uid: 32256 topic_id: 21784 reply_id: 129115


[TOPIC: post.html]
#39

john.dortwegt

[GLOBAL: userInfoPane.html]
john.dortwegt
  • Observer

  • 9 posts
  • Corona SDK

I understand the low prio but its 1 1/2 year later, will this be fixed?
uid: 164820 topic_id: 21784 reply_id: 132750



[topic_controls]
Page 2 of 2 1 2
 
[/topic_controls]