Try this
document.getElementById('ctl00_ContentPlaceHolder1_ASPxRoundPanel1_previewImage').setAttribute( 'src', 'data:image/png;base64,'+ document.axSmartcard.SmartcardData.PhotoB64Encoded)
Make sure that you get the Base64 value correctly for
axSmartcard.SmartcardData.PhotoB64Encoded