Bitmap resolution

0
Hello, I'm doing an activity in which I need the app to capture 3 images, and send them to the bank, these images need to go as String (that is, convert the image to base64), the problem is that the resolution is coming out that neither of the minecraft U-u '

I did the following:

Converting Byte Array

public byte[] convertImageViewToByteArray(Bitmap image) {
    ByteArrayOutputStream stream = new ByteArrayOutputStream();
    image.compress(Bitmap.CompressFormat.JPEG, 100, stream);
    return stream.toByteArray()
}

And when I save the image I store it like this:

img3.setImageBitmap(bitmap2);
Bitmap bit3 = Bitmap.createScaledBitmap(bitmap2, 800, 700, false);
byte[] byteArray3 = convertImageViewToByteArray(bit3);
encodedImage = Base64.encodeToString(byteArray3, Base64.DEFAULT);
imagem.setTerceiraFoto(encodedImage);
    
asked by anonymous 24.04.2018 / 20:47

0 answers