Comments (10)
It is working in Xamarin.Forms (CachedImage) and Windows (FFImage) - DownsampleToViewSize
property.
from ffimageloading.
Very cool !
It'll be very useful & powerful for users 😉
2015-12-06 19:05 GMT+01:00 Daniel Luberda [email protected]:
It is working in Xamarin.Forms (DownsampleToViewSize property)
—
Reply to this email directly or view it on GitHub
#14 (comment)
.
from ffimageloading.
What about Android? is it implemented somehow? I tried ScaleToFit = true, but this is adjusting the height creating an square image. The width does not get adjusted
from ffimageloading.
It isn't implemented on iOS and Android. @molinch suggested possible implementations but it isn't done yet.
from ffimageloading.
Even though it's easy to provide the DownSample width or height.
So it's not a "blocker" not having Fit()
from ffimageloading.
To summarize:
Platform | Xamarin Forms | Windows | Xamarin iOS | Xamarin Android |
---|---|---|---|---|
Manual Downsampling (fixed width/height values) | supported | supported | supported | supported |
Auto Downsampling (image view size) | supported | supported | not supported | not supported |
from ffimageloading.
Well, yesterday I was trying to adjust in Android to the view container, using a fixed DownSample and it didn´t work. Maybe because I was also using rounded corners. I got always a square
from ffimageloading.
Yes it's because of that. RoundedTransformations has additional constructor overrides to set width/height proportions: public RoundedTransformation(double radius, double cropWidthRatio, double cropHeightRatio)
. Just use them and you can control that.
Actually it did work but default RoundedTransformation constructor forces image to be a square:
public RoundedTransformation(double radius) : this(radius, 1d, 1d)
.Transform(new List<ITransformation> {
new RoundedTransformation(7, 200, 120))
}
.DownSample(200, 0)
or
.Transform(new List<ITransformation> {
new RoundedTransformation(7, 200, 120))
}
.DownSample(0, 120)
DownSample always maintain original image aspect ratio. If you do .DownSample(200, 120)
one of parameters is ignored.
from ffimageloading.
I got it working with
.Transform(new CornersTransformation(5, CornerTransformType.AllRounded, 200, 120))
.DownSample(200, 120)
But your example also works. Thanks!
BTW. This library is really cool. I´m using it in Mvvmcross and it´s working like a champ
from ffimageloading.
How do it in XAML? Thanks
from ffimageloading.
Related Issues (20)
- Check if Image Server side has changed from Cached version
- [Bug]In Xamarin.Forms (Android) throws System.ArgumentException in ImageService.SetTaskForTarget (FFImageLoading.Work.IImageLoaderTask currentTask).
- Support for image width/height query in the URL
- Some SVG images are displaying and some are not HOT 3
- CacheKeyFactory used in a CollectionView causes incorrect images to load.
- ReplaceStringMap Question
- Images from URL don't show at all on iOS in Xamarin Forms 5 app HOT 1
- For MAUI see here.... HOT 3
- Image Adjustments in Xamarin
- [ISSUE] [Android] GIF animation weird behavior
- App crashes after calling ImageService.SetTaskForTarget HOT 1
- Guid inside URL is changed
- .Net 6 support HOT 4
- Incomplete downloaded image is cached.
- Images disappear on Android after pressing the (hardware) Back button HOT 1
- .Net 8 support HOT 2
- RotateTransformation does not rotate images on iOS 17 HOT 1
- Image won't load in Maui Windows app
- Inquiry about Data Collection
- On windows image download fails randomly HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ffimageloading.