I would like to fill in the "pixels" of an example image: a 480x800 image I would like to match up to 800x800 but without changing the width or height , I would like to add more pixels but of a black color without the image being deformed
This is something of the code that I have
boton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Bitmap resized = Bitmap.createScaledBitmap(bitmap, 680, 680, true);
int alto = resized.getHeight();
int ancho = resized.getWidth();
String alto1 = String.valueOf(alto);
String ancho1 = String.valueOf(ancho);
texto1.setText(alto1);
texto2.setText(ancho1);
imagen.setImageBitmap(resized);
saveBitmap(resized);
}
});
}
In this block I convert the image to 680x680 but some images are deformed so the idea is that instead of resizing it I would like to fill in with black pixels a 480x680 I would like to fill in 480 to 680 with extra pixels, if you do not understand me, this would prevent the deformity in the images.
The other code is to select the image and save it in another folder with the new size