Sundar Patidar
Sundar Patidar

Reputation: 41

When load image using Picasso its showing blur

In my Android activity, I am loading an image in an ImageView using Picasso in my layout. The problem is that the image is showing as blurred. I have tried another image loader like Glide but I'm still getting blurred image. I have tried this code:

   Picasso.with(this).load(ServiceConstant.BASE_URL_IMAGE + distributor_large_image)
                    .placeholder(R.mipmap.placeholder_banner)
                    .into(img_distributor, new com.squareup.picasso.Callback() {
                        @Override
                        public void onSuccess() {
                            img_distributor.startAnimation(scaleUp);
                        }

                        @Override
                        public void onError() {

                        }
                    });

and the url of image is http://tgpsf.progressivecoders.com/resources/images/distributor/thumb/15205922045aa2654c74bd2.jpg

and my layout imageview is

 <ImageView
            android:id="@+id/img_distributor"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:scaleType="centerCrop"
            android:src="@mipmap/placeholder_banner" />

Please can anyone help me to resolve my problem?

Upvotes: 3

Views: 1428

Answers (2)

Bhushan Udupa
Bhushan Udupa

Reputation: 1

Hey I had the same problem. You can use something like this..

String url = "your url for the image here!!";
Picasso.get()
       .load(url)
       .into(name of the imageview);

This might help you..

Upvotes: 0

Tushar Mittal
Tushar Mittal

Reputation: 141

I have checked the URL you provided it may be the case that you are using too small image or lower quality with bigger imageview. so that may be the issue. Try using other Image URL with better resolution/quality in order to test.

You can also use resize property (along with your desired parameters) of Picasso Lib. for quick loading of large images.

Upvotes: 2

Related Questions