question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The sizes of the corner for the Image are different

See original GitHub issue

ImageView in xml are all like this <ImageView android:id="@+id/iv_pic_three" android:layout_width="match_parent" android:layout_height="75dp" android:scaleType="fitXY"/>

public static void loadCornerImage(final Context context, String url, final ImageView imageView) {
    Glide.with(context).load(url).placeholder(R.mipmap.list_pic_loading).bitmapTransform(new RoundedCornersTransformation(context, 10, 0)
    ).diskCacheStrategy(DiskCacheStrategy.SOURCE).into(imageView);
}

qq 20160625120218

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
TWiStErRobcommented, Dec 2, 2016

Using a custom transformation removes Glide’s ability to auto-apply fitCenter/centerCrop so you need to help it out:

.bitmapTransform(new FitCenter(context), new RoundedCornersTransformation(context, 10, 0))

this will make image Bitmaps uniform in pixel size and hence the corners should have the same size.

0reactions
TWiStErRobcommented, Mar 17, 2017

@MrLaird I don’t see any difference in corner size, the lines of the right image may be deceiving to the eye: image (created this by removing background, and flipping the right to the left image, and changing its transparency; the grey pixels are residue from imperfect background cutting)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Rounded Corners on Images | IANR Media | Nebraska
You can round all of the image's corners or just select corners, vary the radius on different corners or display an image in...
Read more >
How to get an image to go to a corner and automatically adjust ...
since your image is always a square you can do the following: img{ width: 100vmin; height: 100vmin; position: absolute; top: 0; right: 0;...
Read more >
Change the size of a picture, shape, text box, or WordArt
Change the size of a picture, shape, text box, or WordArt · Click the dialog box launcher Icon image in the bottom right...
Read more >
<img>: The Image Embed element - HTML - MDN Web Docs
The HTML element embeds an image into the document. ... Use for images that must be drawn accurately at different sizes.
Read more >
How to crop and resize images - Adobe Photoshop
Crop and straighten an image · Select the Crop tool in the Tools panel. · Drag any edge or corner to adjust the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found