Implemented decoding and saving images on client side