Better handling of zero sized images, and where the picture stream doesn't have enough data left for a full header