crop and clean base64