cipheroidharshal / android-query

Automatically exported from code.google.com/p/android-query
0 stars 0 forks source link

Image loading with rounded corners and ratio cropping produces improper results #102

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
        AQuery aq = new AQuery(this);
        ImageOptions options = new ImageOptions();
        options.ratio = 1;
        options.round = 15;
        aq.id(R.id.image_schedule_clicked).image(app.currentItem.getImage(), options);

What is the expected output? What do you see instead?
I expect the image to be cropped, then the corners to be rounded.
Instead, the corners on the image are rounded, then the image is cropped. 

What version of the product are you using? On what operating system?
most recent version of aquery

Please provide any additional information below.

Original issue reported on code.google.com by fdoyl...@gmail.com on 5 Dec 2012 at 3:09

GoogleCodeExporter commented 8 years ago
This actually cannot be done with the current code to rounding images. So the 2 
settings can't apply together.

The entire bitmap is rounded with anti-alias. With ratio, all corners might be 
cut off, so technically it's rounded, but might not be showing depends on ratio.

I would like to apply round corner dynamically without creating a new bitmap, 
but couldn't find an efficient way to do that in Android.

If anyone can point out a way to do this I will gladly test it out.

Original comment by tinyeeliu@gmail.com on 10 Dec 2012 at 1:58