image size and header type check
Merge pull request #40 from marqsm/imagehandling

image size and header type check