Added encode/decode for image types
Merge branch 'origin/master'