Imageinputstream from byte array. I have found an alternative way of compressing the Image.