Does Picasso use resizing options during fetch ()?

I mean this post Getting Picasso for pre-printing future images , where @BillMote uses fetch () with centerCrop () and additional parameters:

Picasso.with(getApplicationContext()) .load(url) .resizeDimen(R.dimen.article_image_preview_width, R.dimen.article_image_preview_height) .centerCrop() .fetch(); 

Will Picasso appreciate such options, or will Picasso save the image directly to the cache, so are these parameters ignored and should be used later when the image is pulled out of the cache and viewed?

It’s still not clear to me (and after 6 months I didn’t find any documentation where it was clearly defined [I admit that I have not studied it yet)] if Picasso applies any such parameters before saving the file to the cache or repeatedly each time, when it displays the image.

Something like centerCrop () does not make sense to me in the above statement, because the size of the target ImageView at this stage is not clear. It might be different for resizeDimen (), but I doubt Picasso will fit , because JakeWharton once said in a post that Picasso relies on okhttp to cache images.

Can someone shed some light please.

+5
source share

Source: https://habr.com/ru/post/1208706/


All Articles