I save a image file to the document directory and need to load it back in and display it.
Trouble is when loading it back in it is tiny and not full size.
I have checked the file and it is 640 x 960 (it’s a screenshot of the iPhone 4s screen) but won’t display as that.
To display it am using -
homeScreenImage = display.newImage( “k3lbd676.png”, system.DocumentsDirectory, true )
But not sure that is the way to do it. I can’t use newImageRect as I don’t know the size (could be any iPhone), I could put a load of if statements in checking size I suppose.
On the simulator it works perfectly but on the actual phone it doesn’t.
EDIT: This is sorted now. It was down to the way I was saving the file to begin with. I needed to display the image once the user selected it from the library. So to save it, I put it in a display group and saved the group (display.save) this worked fine on the simulator and the image kept it’s size but on the device it didn’t. I have no idea what it did as I didn’t look into it but it would not display properly on loading it back in. So now I save it straight to a file from the photo picker call and load it back in.
Dave