Unit Test for the new API classes

Change-Id: I824c9e34486f3177b52ad0c17df4f60109982579
Image Jpeg compression moved to a separate class for better unit testing, more tests added

Change-Id: I493f3d26df8eea26755eb8bceee769c3f513fb90