Reputation: 203
I'm working on a small project to take pictures with Android devices, and then sending these files to a web server. The pictures are being taken without problems, but the "display.save" section is cropping the file to the size of the screen.
local function FotoTomada(event)
if (event.completed == true) then
display.save( event.target, "foto.jpg", {isFullResolution=true})
SubirFoto()
end
end
If my cell phone has a screen resolution of 480x500, that's the resolution the picture saved to a file is getting. Does anyone know of any workaround for this? Thanks in advance!
Upvotes: 0
Views: 225
Reputation: 1683
Of course, that only saves the photo in your device resolution. Use this directly to save it to wherever you want:
local function onComplete( event ) local photo = event.target print( "photo w,h = " .. photo.width .. "," .. photo.height ) end
if media.hasSource( media.Camera ) then media.capturePhoto( { listener=onComplete } ) else native.showAlert( "Corona", "This device does not have a camera.", { "OK" } ) end
Upvotes: 0
Reputation: 161
You can provid the destination in media.capturePhoto( { listener, [, destination] } ) see CoronaDocs
Upvotes: 2