moved code into own function DecodeJpegImage()