GPUImagePicture: check that the memory layout is valid for using the CGImage directly in GL

This corrects the fault introduced by my previous commit enabling CGImages to be used directly in GL.
Merge branch 'refs/heads/gpuimagepicture-redraw2' into develop