ImageView does not stretch image properly

Therefore, I do not know why this is happening. I am using Universal Image Loader to download these images. It seems that the last row of pixels is stretched for some strange reason. I want the image to just stretch evenly. (I don't care if it looks weird. The images below are for demonstration purposes.)

Also, disregard the first and last image. I intentionally blurred it because someone came across it.

Images appear like this Here's how I installed my universal image downloader:

    //setup Image Loader for loading cruise line logos
    displayImageOptions = new DisplayImageOptions.Builder()
    .showImageOnLoading(R.drawable.ic_launcher)//show this image when image is loading
    .showImageForEmptyUri(R.drawable.ic_launcher)//show this image incase image doesn't exist
    .showImageOnFail(R.drawable.ic_launcher)//show this image if fetching image from URL didn't work
    .cacheInMemory(true)//cache image in RAM
    .cacheOnDisc(true)//cache image in device for later use
    .considerExifParams(true)
    .displayer(new RoundedBitmapDisplayer(5))//super subtle rounded corners on images
    .build();
+4
source share
1 answer

, RoundedBitmapDisplayer .

, , RoundedDrawable, canvas.drawRoundRect() Drawable, BitmapShader, BitmapShader ( ). SimpleBitmapDisplayer, ImageView.setImageBitmap() .

, , , . - Canvas.saveLayer() BitmapDrawable , PorterDuff.Mode.DST_IN. , BitmapDisplayer.

+5

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


All Articles