Ok, now I’ve done some testing using scaling as per advice.
The complete code looks like this:
\_W = display.contentWidth \_H = display.contentHeight local function itemPhotoOnComplete( event ) if (event.completed == true) then local photo = event.target print(" Original photo dimensions = (" .. photo.width .. " x " .. photo.height .. ")") local scaling = 0.25 local scaledW = math.floor(photo.width\*scaling) local scaledH = math.floor(photo.height\*scaling) -- Rescale, save and remove photo print(" Scaled photo dimensions = (" .. scaledW .. " x " .. scaledH .. ")") photo:scale(scaling, scaling) display.save(photo, "img.jpg", system.TemporaryDirectory) photo:removeSelf() photo = nil -- Show rescaled image loadedImage = display.newImage("img.jpg", system.TemporaryDirectory, \_W\*0.5, \_H\*0.5) print(" Loaded image size = (" .. loadedImage.width .. " x " .. loadedImage.height .. ")") end end local function takePhotoTouchHandler(event) if (event.phase == "ended") then -- Get image from camera if media.hasSource( media.Camera ) then print("Camera detected - starting camera") media.capturePhoto( { listener = itemPhotoOnComplete } ) else native.showAlert("Error", "No camera found", { "OK" } ) end end end local takePhoto = display.newText("TAKE PHOTO", \_W\*0.5, \_H\*0.9, native.systemFont, 40) takePhoto:addEventListener("touch", takePhotoTouchHandler)
I’ve just set the scaling to 0.25 for now - just to see if anything works.
It doesn’t. Still the dimension of the loaded image does not correspond to the dimensions of the scaled saved image:
I/Corona (32042): Camera detected - starting camera
V/Corona (32042): Downsampling image file ‘/storage/emulated/0/Pictures/Picture83.jpg’ to fit max pixel size of 4096.
I/Corona (32042): Original photo dimensions = (1494 x 2656)
I/Corona (32042): Scaled photo dimensions = (373 x 664)
V/Corona (32042): Downsampling image file ‘/storage/emulated/0/Pictures/Picture83.jpg’ to fit max pixel size of 4096.
I/Corona (32042): Loaded image size = (251 x 531)
Another thing that may or may not shed some light on this issue is how the screen looks on the device while running this app.
After pressing the “TAKE PHOTO” text, the camera opens after I have taken a photo, this is how it looks:

(The texts says “TRY AGAIN” and “OK”, in case you don’t know norwegian…)
Then after pressing ok, the screen looks like this:

I don’t know if the scaling is right, but the image is also cropped. This was not part of the deal. Why is it cropped. I’m sure the scaling issue and the cropping is part of the same problem.
Do you consider me rude if I ask you if you have actually tried to run this app on an Android device? It’s the third time I ask and I do not get any reply on that, so there must be something rude/wrong about the way I’m asking.
English is not my native tongue so it may be something I write that comes out a bit wrong. I apologize for any such thing.