I finally came up with a workaround for the memory issues I was facing by changing the way photos are displayed.
When the user takes a picture, it is sent to our web server, rotated and stored for transmitting to back to our company's server. This photo has a maximum resolution of 2048x2048. (No change in this part.)
Then, a smaller version of the photo (a thumbnail) is returned to the user's device. This photo has a maximum resolution of 512x512. It is this new, smaller version which I am now displaying for the user.
This has drastically reduced the memory consumption and hence eliminated, or at least reduced, the above issue.
For example, with one photo with which I was working:
original size: 4,134,901 bytes
compressed: 875,887 bytes
thumbnail: 48,959 bytes, i.e. 5.6% of the size of the previously displayed picture
Both the original compressed version and the new thumbnail are being stored with JPEG image quality set to 90%.
The user loses the high resolution of the image on the phone but it is saved in the highest resolution allowable on the server. This isn't an ideal solution, but it is allowing us to function.