Resize Base64 Image Javascript