Skip to content

)} )} )} )}

ImageExtensions.LoadImageBytesFromUrl(IBlobCache, string, bool, DateTimeOffset?) method

Defined in

Type: ImageExtensions Namespace: Akavache Assembly: Akavache.HttpDownloader.dll

Applies to

net10.0, net10.0-tvos26.0, net10.0-maccatalyst26.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net10.0-android36.0, net10.0-ios26.0, net10.0-windows10.0.19041, net10.0-macos26.0, net9.0, net9.0-windows10.0.19041, net9.0-browserwasm1.0, net9.0-desktop1.0, net8.0, net8.0-windows10.0.19041, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-macos14.5, net8.0-tvos17.2, netstandard2.1, net481, net462

Overloads

  • 1. public static IObservable<byte[]> LoadImageBytesFromUrl(this IBlobCache blobCache, string url, bool fetchAlways = false, DateTimeOffset? absoluteExpiration = null)
  • 2. public static IObservable<byte[]> LoadImageBytesFromUrl(this IBlobCache blobCache, Uri url, bool fetchAlways = false, DateTimeOffset? absoluteExpiration = null)
  • 3. public static IObservable<byte[]> LoadImageBytesFromUrl(this IBlobCache blobCache, string key, string url, bool fetchAlways = false, DateTimeOffset? absoluteExpiration = null)
  • 4. public static IObservable<byte[]> LoadImageBytesFromUrl(this IBlobCache blobCache, string key, Uri url, bool fetchAlways = false, DateTimeOffset? absoluteExpiration = null)

1. Overload

public static IObservable<byte[]> LoadImageBytesFromUrl(this IBlobCache blobCache, string url, bool fetchAlways = false, DateTimeOffset? absoluteExpiration = null)

View source

Summary: Downloads an image from a remote URL and returns the image bytes. This method combines DownloadUrl and LoadImageBytes functionality, using cached values when possible.

Parameters

NameTypeDescription
blobCache[IBlobCache](#The blob cache to store and retrieve the image data.
urlstringThe URL to download the image from.
fetchAlways = falseboolA value indicating whether to always fetch the image from the URL, bypassing the cache.
absoluteExpiration = nullDateTimeOffset?An optional expiration date for the cached image data.

Returns: IObservable -- An observable that emits the image bytes.

2. Overload

public static IObservable<byte[]> LoadImageBytesFromUrl(this IBlobCache blobCache, Uri url, bool fetchAlways = false, DateTimeOffset? absoluteExpiration = null)

View source

Summary: A combination of DownloadUrl and LoadImageBytes, this method fetches an image from a remote URL (using the cached value if possible) and returns the image bytes.

Parameters

NameTypeDescription
blobCache[IBlobCache](#The blob cache to load the image from if available.
urlUriThe URL to download.
fetchAlways = falseboolIf we should always fetch the image from the URL even if we have one in the blob.
absoluteExpiration = nullDateTimeOffset?An optional expiration date.

Returns: IObservable -- A Future result representing the image bytes.

3. Overload

public static IObservable<byte[]> LoadImageBytesFromUrl(this IBlobCache blobCache, string key, string url, bool fetchAlways = false, DateTimeOffset? absoluteExpiration = null)

View source

Summary: A combination of DownloadUrl and LoadImageBytes, this method fetches an image from a remote URL (using the cached value if possible) and returns the image bytes.

Parameters

NameTypeDescription
blobCache[IBlobCache](#The blob cache to load the image from if available.
keystringThe key to store with.
urlstringThe URL to download.
fetchAlways = falseboolIf we should always fetch the image from the URL even if we have one in the blob.
absoluteExpiration = nullDateTimeOffset?An optional expiration date.

Returns: IObservable -- A Future result representing the image bytes.

4. Overload

public static IObservable<byte[]> LoadImageBytesFromUrl(this IBlobCache blobCache, string key, Uri url, bool fetchAlways = false, DateTimeOffset? absoluteExpiration = null)

View source

Summary: A combination of DownloadUrl and LoadImageBytes, this method fetches an image from a remote URL (using the cached value if possible) and returns the image bytes.

Parameters

NameTypeDescription
blobCache[IBlobCache](#The blob cache to load the image from if available.
keystringThe key to store with.
urlUriThe URL to download.
fetchAlways = falseboolIf we should always fetch the image from the URL even if we have one in the blob.
absoluteExpiration = nullDateTimeOffset?An optional expiration date.

Returns: IObservable -- A Future result representing the image bytes.