Hey Everyone,
I’m fairly new to Corona and Lua, but I’m very impressed what what it’s capable of.
I have been dabbling for the past week, and built a simple application that takes photos and then displays the results in a scrollView widget. I was stoked at how quick I could this together, all thanks to you guys and the support that already exists.
I have however encountered my first road block. Running on the simulator the camera was only taking images 201px square. When I put it on the device, and the scrollView gets loaded up with captures, the application then takes forever to load, and will eventually crash. I’m guessing that the iphone (4 in this case) is capturing images much higher than 201px, and it’s maxing out texture memory or something.
So what I want to do is process each image as it’s taken, to produce a thumbnail (square, rather than portrait/landscape) to be used in the scrollView, and still have a higher quality one available when one of the tiles in the scrollView is clicked on. I’m also looking at sending this information to a database, and any optimisations here will help.
I have seen techniques like this: (http://forums.coronalabs.com/topic/25955-is-it-possible-to-resize-images-taken-from-mediashowmediacamera-in-an-app-itself/?hl=%2Bresizing+%2Bimages#entry140431), I was wondering if there were more elegant approaches. I’m used to using software like Nuke and Shake for image processing, and resizing is very straight forward. This must be a common problem. Is this the best way, are there any other suggestions out there?
Thanks for reading!
Campbell