Я кодирую битовую карту в строку Base64 для отправки в API, но я получаю 500
, потому что она не кодируется должным образом.Но когда я декодирую Base64 String
обратно в Bitmap
, он отображается правильно.
Кроме того, когда я копирую закодированную строку и пытаюсь декодировать с помощью онлайн-конвертера, это не работает.Почти как кодирование и декодирование работают только на Android.
Когда я использую онлайн-конвертер для декодирования изображения и отправки его в API, он отлично работает.
ссылка на rawimage
fun convertBase64ToImage(base46String: String): Bitmap {
val stuff = Base64.decode(base46String, Base64.DEFAULT)
return BitmapFactory.decodeByteArray(stuff, 0, stuff.size)
}
fun convertImageToBase64(image: Bitmap): String {
val byteArrayOutputStream = ByteArrayOutputStream()
image.compress(Bitmap.CompressFormat.JPEG, IMAGE_QUALITY, byteArrayOutputStream)
return Base64.encodeToString(byteArrayOutputStream.toByteArray(), Base64.DEFAULT)
}
Строка Base64 конвертера онлайн => iVBORw0KGgoAAAANSUhEUgAAAPoAAAD6CAIAAAAHjs1qAAAABGdBTUEAAFjH/EfgAgAAACBjSFJNAAB6JQAAgIMAAPn/AACA5gAAdS4AAOpfAAA6lwAAF29p5MQrAAAR9klEQVR4nGL4PwpGwYgBAAHEMNAOGAWjgH4AIIBGk/soGEEAIIBGk/soGEEAIIBGk/soGEEAIIBGk/soGEEAIIBGk/soGEEAIIBGk/soGEEAIIBGk/soGEEAIIBGk/soGEEAIIBGk/soGEEAIIBGk/soGEEAIIBGk/soGEEAIIBGk/soGEEAIIBGk/soGEEAIIBGk/soGEEAIIBGk/soGEEAIIBGk/soGEEAIIBGk/soGEEAIIBGk/soGEEAIIBGk/soGEEAIIBGk/soGEEAIIBGk/soGEEAIIBGk/soGEEAIIBGk/soGEEAIIBGk/soGEEAIIBGk/soGEEAIIBGk/soGEEAIIBGk/soGEEAIIBGk/soGEEAIIBGk/soGEEAIIBGk/soGEEAIIBGk/soGEEAIIBGk/soGEEAIIBGk/soGEEAIIBGk/soGEEAIIBGk/soGEEAIIBGk/soGEEAIIBGk/soGEEAIIBGk/soGEEAIIBGk/soGE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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
, когда я изменяю compressFormat с JPEG на PNG, я получаю это => iVBORw0KGgoAAAANSUhEUgAAA2sAAANrCAIAAABX15fHAAABGmlDQ1BTa2lhAAAokX2RvUrDUBiGH6uLIOjg0MEhg4OLP/2hKri0VYtrq1Dd0jQGtU1DGtELEFycHJz1JvQW3AtOeg8uOvueZEigxPfwnvPw5stJvnOgUEQqLMHQj8J2q2F1T88sMrKdcUC+ZuD3w8wwWf+nLk/zfXfsaP2Wo1Af15Z98bKX8K3hXsIPhsPjdlP8LF7zMtzL8E0UROJ3U+8EoeFP8d5wcO2k/82C6590tHblFVqMNDwGuGzS4YoLbFGNA5pU5H1xmV3xFlVRnW3ZpA3N1bjKpKX4aUV0SD09z9EL7PzA7GOa9Z7g7R6KX2m2qh4W7+B1EtihHUdzxueXyTlPK303vYucXq2pXi2O8HHYEJXVWYnaHwo5R5dNdEbDAAAAA3NCSVQICAjb4U/gAAAgAElEQVR4nOzdZ1cjSba3fRlkkJCXkMGXazM9a53v/ylm3TPV3WXw8l5CBgGSnhf/h5gcEILAVXXX9XtRa04fQJmpNDt37Njhns/nLgAAAODBPN96AwAAAPAXQwQJAAAAO0SQAAAAsEMECQAAADtEkAAAALBDBAkAAAA7RJAAAACwQwQJAAAAO0SQAAAAsEMECQAAADtEkAAAALBDBAkAAAA7RJAAAACwQwQJAAAAO0SQAAAAsEMECQAAADtEkAAAALBDBAkAAAA7RJAAAACwQwQJAAAAO0SQAAAAsEMECQAAADtEkAAAALBDBAkAAAA7RJAAAACwQwQJAAAAO0SQAAAAsEMECQAAADtEkAAAALBDBAkAA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