That message indicates that your phone doesn't have the necessary amount of RAM to open the application and the image. Try holding the Home button for a few seconds until the Task manager appears. Swipe and close all the open applications, then navigate to Secure Gallery and open the necessary image. Avoid installing too many apps on your phone if it's not powerful enough in terms of CPU and RAM.