Whatever your processImage function is returning, it's not 1024x1344 raster data. I doubt it's getting cut off either. It's a 1x27 vector -- probably the same 1x27 character vector that is the filename.
The problem is in the processImage function. We can't really go any further unless you attach it. If the behavior is changing depending on the number of output arguments, there may be an issue with how varargout is being used.