Circular image library

Hi all,

For the past year and a half or more we've been using @JamesMontemagno's Xam.Plugins.Forms.CachedImageCircle-plug-in (version 0.0.0.1 beta) to render circular user profile images in our App. This worked well until we recently tried to install the newest version of FFImageLoading, upgrading from version 2.3.6 to version 2.4.3.840. For, as it turns out, the 2.4-series of FFImageLoading removes one of the CircleCachedImage's dependencies, namely the Android CachedImageRenderer that the CachedImageCircle depends upon (iOS doesn't seem to suffer from this issue). As a consequence it has now become impossible for us to update FFImageLoading.

The exact error message I get when building is below:

The type 'CachedImageRenderer' is defined in an assembly that is not referenced. You must add a reference to assembly 'FFImageLoading.Forms.Droid, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.

In response, I went out looking for a replacement for the CircleCachedImage and found @JamesMontemagno's Xam.Plugins.Forms.ImageCircle. Still being on Xamarin.Forms 2.5.1, I installed version 2.0.2, and after changing some assembly references, base class identifiers and renderer initialization, all seems to work fine again, except for the following issues:

  • CircleImage doesn't offer access to the HTTP-client used to download images specified in UriImageSources. We, however, need this access to configure the authentication used to access profile images. Currently images don't load.
  • CircleImage doesn't implement a caching strategy, which we used to profile pictures offline to speed up App performance and reduce network traffic.
  • CircleImage doesn't support down-sampling the images retrieved.
  • CircleImage doesn't disclose an Error-event to detect when loading the image fails (at which point we had implemented some custom logic).

In other words, we can't, at present, switch to using Xam.Plugins.Forms.ImageCirc.le. Nor can we FFImageLoading, which forms its dependency

Therefore I'd like to know

  • whether there are any alternative circular image renderers for Xamarin.Forms that work on Android, iOS and UWP?
  • whether there's another way of upgrading the FFImageLoading-libraries without having to switch to Xam.Plugins.Forms.ImageCircle first?
  • whether there's any other way to make Xam.Plugins.Forms.ImageCircle meet the above requirements.

Thanks in advance for your help!

Best regards,
Alexander.

Best Answer

Answers

  • AlexanderMelchersAlexanderMelchers NLMember ✭✭

    Hi @JamesMontemagno,

    Sorry for involving you in this mixup here as well. To be honest, I had forgotten that this thread was still open. We're currently indeed planning to switch to FFImageLoading, though for our specific implementation I need to be able to apply a circular fill-colour - which the old Xam.Plugins.Forms.CachedImageCircle did, but FFImageLoading's CircleTransformation does support. Though possible with FFImageLoading it requires a new ColorFillTransformation to be included in the list of FFImageLoading's transformation, comprising as of yet unreviewed code (for more information, see here; reviewers and testers wanted).

Sign In or Register to comment.