maskScaleX works on simulator, but way too small on smartphone

Dear corona community,

I have a mask png that is 400px wide and high. When I use this mask and add it to an image:

image:setMask(mask)

image.maskScaleX = imageSize / 400

image.maskScaleY = imageSize / 400

it perfectly masks the image in the desired size (imageSize) on my simulator. imageSize is calculated as follows:

imageSize = display.actualContentHeight/2 - 45 - 10

But when I use it on my smartphone, the mask is way smaller and shows a smaller part of the image than on the simulator.

Any ideas where to look at?

Thanks

Here is some more information: It looks like the main difference is that the image in

image:setMask

comes from display.newImage on the simulator, but from media.capturePhoto on my android smartphone.

I followed that path further and my cameraListener looks as follows:

-- listener function to receive and fit image from camera or gallery function cameraListener(event) faverPicture = event.target container:insert(faverPicture) -- store photo in globalSpace globalSpace.setImg1(faverPicture) -- scale to fit container if(faverPicture.width \< faverPicture.height) then faverPicture:scale(display.contentWidth / faverPicture.width, display.contentWidth / faverPicture.width) else faverPicture:scale(display.contentWidth / faverPicture.height, display.contentWidth / faverPicture.height) end end

So, there is scaling going on within my listener. If this scaling is done, the mask on this image in another scene is small. Again, only my android. If I leave out the scaling in the listener function, the mask looks fine.

Any ideas?

Here is some more information: It looks like the main difference is that the image in

image:setMask

comes from display.newImage on the simulator, but from media.capturePhoto on my android smartphone.

I followed that path further and my cameraListener looks as follows:

-- listener function to receive and fit image from camera or gallery function cameraListener(event) faverPicture = event.target container:insert(faverPicture) -- store photo in globalSpace globalSpace.setImg1(faverPicture) -- scale to fit container if(faverPicture.width \< faverPicture.height) then faverPicture:scale(display.contentWidth / faverPicture.width, display.contentWidth / faverPicture.width) else faverPicture:scale(display.contentWidth / faverPicture.height, display.contentWidth / faverPicture.height) end end

So, there is scaling going on within my listener. If this scaling is done, the mask on this image in another scene is small. Again, only my android. If I leave out the scaling in the listener function, the mask looks fine.

Any ideas?