Why does the image get bad quality?

Asked

Viewed 827 times

0

Well, the question is simple, why is the image in low quality?

Code:
Main class:

@Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        if (requestCode == CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE && resultCode == RESULT_OK) {
            Bundle extras = data.getExtras();
            Bitmap imageBitmap = (Bitmap) extras.get("data");

            Intent imageActivity = new Intent(MainActivity.this, ImageActivity.class);
            imageActivity.putExtra("image", imageBitmap);
            startActivity(imageActivity);
        }
    }

Image class:

Intent intent = getIntent();
Bitmap image = intent.getParcelableExtra("image");

this.image.setImageBitmap(image);

Imagery:


Original image: inserir a descrição da imagem aqui


Image in Activity Image: inserir a descrição da imagem aqui

  • Because extras.get("data"); returns the photo in reduced size(Thumbnail). See on documentation how to get the full size photo.

  • 1

    Thank you ramaral

  • try this : http://stackoverflow.com/questions/31445156/how-to-take-a-picture-to-show-in-a-imageview-and-save-the-picture

  • I already did, but thanks anyway, I don’t know "mark as solved"

  • @Osvaldocésar If you have already solved the ideal is to put your resolution as an answer, with the respective explanations about the problem and how you have overcome the problem. So you can help other people who have the same problem.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.